Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-22 Thread Paul Beach

>Only constant FD_SETSIZE at compilation time which can by changed in code.

See:
src/remote/inet.cpp

#ifdef  WIN_NT
#define FD_SETSIZE 2048
#endif

Regards
Paul 

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-21 Thread Dimitry Sibiryakov
21.01.2016 16:45, Mark Rotteveel wrote:
> That doesn't really answer the why :)

   Firebird uses only one thread for receiving network packets and the limit is 
related to 
select()/WSASelect() function that operate with fixed size array of socket 
handles.

-- 
   WBR, SD.

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-21 Thread Dmitry Kuzmenko
Hello!

Thursday, January 21, 2016, 6:06:06 PM, you wrote:

l> may i ask what is the reason of that limit on windows?

that type of interest is suspicious. Currently, huge companies works
in client-server mode with 500-700 simultaneous connections, without
any problem.
When someone asks about 2000 connections, seems that he need
connection pooling and 3-tier architecture, rather than
client-server.
Because, for example, maybe 10 years ago Linux had limit of 600
connections, and to increase it, you needed to recomplire the core.

So, question like that is not normal. As it was said, Firebird have
limits close to OS limits, or depends on OS limits. Well, then, what
else do you need? Want 3000 connections at Windows? Ask Microsoft
about that.

But anyway, even ~1000 client-server connections are VERY huge number,
that needs special hardware infrastructure to implement that. So, this
is not only about "firebird limits".

-- 
Dmitry Kuzmenko, www.ibase.ru


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-21 Thread liviuslivius
> That doesn't really answer the why :)

>>It does if you google FD_SETSIZE and winsock
>>https://msdn.microsoft.com/en-us/library/windows/desktop/ms739169%28v=vs.85%29.aspx

>>Paul

Hi,

i read this but i still do not know the reason. Is this declared by Firebird 
in code.
Because i read in this article that there is no limit in Winsock at all.
Only constant FD_SETSIZE at compilation time which can by changed in code.
But maybe i can understand this incorrectly


regards,
Karol Bieniaszewski





--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-21 Thread Dimitry Sibiryakov
21.01.2016 18:20, Leyne, Sean wrote:
> Operationally, your app will die/fail which you try to exceed the Windows 
> FD_Size value -- it is a OS level limit.

   Nope, it is truly set at compile time and only application-defined 
structures are used 
by OS.
   Problem is not a size of structure itself, but very ineffective methods to 
find out 
which socket is signaled after select() has returned.
   I wonder if someone tried to use bit-scanning instructions of modern x86 
processors to 
solve the problem...

-- 
   WBR, SD.

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-21 Thread Jim Starkey
On 1/21/2016 12:41 PM, Dimitry Sibiryakov wrote:
> 21.01.2016 18:20, Leyne, Sean wrote:
>> Operationally, your app will die/fail which you try to exceed the Windows 
>> FD_Size value -- it is a OS level limit.
> Nope, it is truly set at compile time and only application-defined 
> structures are used
> by OS.
> Problem is not a size of structure itself, but very ineffective methods 
> to find out
> which socket is signaled after select() has returned.
> I wonder if someone tried to use bit-scanning instructions of modern x86 
> processors to
> solve the problem...
>

Microsoft is now supporting the Linux poll() as WSAPoll().  Much more 
intelligent data structures and is smart enough to wake up when the 
remote end of a socket is closed.  I don't know what platforms do or 
don't support poll(), so select() would have to be conditional, but 
poll() beats the pants off select().

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-21 Thread Leyne, Sean

> Microsoft is now supporting the Linux poll() as WSAPoll().  Much more
> intelligent data structures and is smart enough to wake up when the remote
> end of a socket is closed.  I don't know what platforms do or don't support
> poll()

Client OS == Windows Vista+
Server OS == Windows 2008+


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-21 Thread Paul Beach
>> may i ask what is the reason of that limit on windows?
> 
> http://tracker.firebirdsql.org/browse/CORE-4439

> That doesn't really answer the why :)

It does if you google FD_SETSIZE and winsock
https://msdn.microsoft.com/en-us/library/windows/desktop/ms739169%28v=vs.85%29.aspx

Paul

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-21 Thread Leyne, Sean


> i read this but i still do not know the reason. Is this declared by Firebird 
> in code.
> Because i read in this article that there is no limit in Winsock at all.
> Only constant FD_SETSIZE at compilation time which can by changed in code.
> But maybe i can understand this incorrectly

Technically, yes, you can change the size at compilation.

Operationally, your app will die/fail which you try to exceed the Windows 
FD_Size value -- it is a OS level limit.

That fact that it is exposed as a constant is a matter of convenience, as it 
allows a developer to program knowing that a limit exist and has to be managed, 
without hard coding the limit.


Sean


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-21 Thread liviuslivius
Hi,

..
>>But anyway, even ~1000 client-server connections are VERY huge number,
>>that needs special hardware infrastructure to implement that. So, this
>>is not only about "firebird limits".

i have now near 400 connections and do not see any problems with resources 
or server response.
But i really care about query plans and optimizations - may be this is the 
reason.
Within a year I expect a tripling of the number of connections (fixed not 
pooled)
And this is the reason of question. I see that i still not reach limit 
2048 - then i still have reserves.


regards,
Karol Bieniaszewski

-Oryginalna wiadomość- 
From: Dmitry Kuzmenko
Sent: Thursday, January 21, 2016 4:56 PM
To: For discussion among Firebird Developers
Subject: Re: [Firebird-devel] ODP: Re: fb3 connections limit

Hello!

Thursday, January 21, 2016, 6:06:06 PM, you wrote:

l> may i ask what is the reason of that limit on windows?

that type of interest is suspicious. Currently, huge companies works
in client-server mode with 500-700 simultaneous connections, without
any problem.
When someone asks about 2000 connections, seems that he need
connection pooling and 3-tier architecture, rather than
client-server.
Because, for example, maybe 10 years ago Linux had limit of 600
connections, and to increase it, you needed to recomplire the core.

So, question like that is not normal. As it was said, Firebird have
limits close to OS limits, or depends on OS limits. Well, then, what
else do you need? Want 3000 connections at Windows? Ask Microsoft
about that.

But anyway, even ~1000 client-server connections are VERY huge number,
that needs special hardware infrastructure to implement that. So, this
is not only about "firebird limits".

-- 
Dmitry Kuzmenko, www.ibase.ru


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel 


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: Re: fb3 connections limit

2016-01-21 Thread Michal Kubecek
On Thu, Jan 21, 2016 at 01:20:02PM -0500, Jim Starkey wrote:
> On 1/21/2016 12:41 PM, Dimitry Sibiryakov wrote:
> > 21.01.2016 18:20, Leyne, Sean wrote:
> >> Operationally, your app will die/fail which you try to exceed the
> >> Windows FD_Size value -- it is a OS level limit.
> > Nope, it is truly set at compile time and only application-defined
> > structures are used by OS.  Problem is not a size of structure
> > itself, but very ineffective methods to find out which socket is
> > signaled after select() has returned.  I wonder if someone tried to
> > use bit-scanning instructions of modern x86 processors to solve the
> > problem...
> 
> Microsoft is now supporting the Linux poll() as WSAPoll().  Much more 
> intelligent data structures and is smart enough to wake up when the 
> remote end of a socket is closed.  I don't know what platforms do or 
> don't support poll(), so select() would have to be conditional, but 
> poll() beats the pants off select().

For really large sets of sockets, epoll() would be even better. IIRC the
FB3 code uses poll() if available, select() otherwise. On Windows,
select() is used always.

Anyway, IIRC we only use poll() or select() for connections belonging to
one client so that technical limitations of that syscall should not
matter for the client connections limit.

  Michal Kubecek


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel