Re: [PATCH] Solaris sockets for support/ab.c (httpd-2_0_32-beta)
On Wed, Mar 13, 2002 at 07:05:45AM -0500, Jeff Trawick wrote: Martin Ramshaw [EMAIL PROTECTED] writes: By default, Solaris (at least, Solaris 7 for sparc) restricts the number of file handles that may be used. See the comments in the attached patch file for more details. Lots of Unix-ish systems work the same way. Personally, I think it is better if you put ulimit -n unlimited in your shell init script rather than adding the logic to ab. Yup, my thoughts too. -- justin (wondering why I'm still up)
Re: [PATCH] Solaris sockets for support/ab.c (httpd-2_0_32-beta)
On Wed, 13 Mar 2002 04:18:00AM -0800, Justin Erenkrantz wrote: On Wed, Mar 13, 2002 at 07:05:45AM -0500, Jeff Trawick wrote: Martin Ramshaw [EMAIL PROTECTED] writes: By default, Solaris (at least, Solaris 7 for sparc) restricts the number of file handles that may be used. See the comments in the attached patch file for more details. Lots of Unix-ish systems work the same way. Personally, I think it is better if you put ulimit -n unlimited in your shell init script rather than adding the logic to ab. Yup, my thoughts too. -- justin (wondering why I'm still up) I see. So if I want to use 'ab' in a meaningful way on a 'Unix-ish system' I should write a shell wrapper script. Is it just me, or does that sound kind of lame ? Thanks for the feedback. Regards
Re: [PATCH] Solaris sockets for support/ab.c (httpd-2_0_32-beta)
Martin Ramshaw [EMAIL PROTECTED] writes: On Wed, 13 Mar 2002 04:18:00AM -0800, Justin Erenkrantz wrote: On Wed, Mar 13, 2002 at 07:05:45AM -0500, Jeff Trawick wrote: Martin Ramshaw [EMAIL PROTECTED] writes: By default, Solaris (at least, Solaris 7 for sparc) restricts the number of file handles that may be used. See the comments in the attached patch file for more details. Lots of Unix-ish systems work the same way. Personally, I think it is better if you put ulimit -n unlimited in your shell init script rather than adding the logic to ab. Yup, my thoughts too. -- justin (wondering why I'm still up) I see. So if I want to use 'ab' in a meaningful way on a 'Unix-ish system' I should write a shell wrapper script. That is not true in general. Plenty of people use ab on Unix and I've never heard a complaint about not being able to get enough file descriptors. Anyway, I didn't mean a shell wrapper script. I mean that you could/should put ulimit -n unlimited in your .profile/.bashrc/whatever. Is it just me, or does that sound kind of lame ? Some thoughts: The operating system has tools to adjust resource limits. Why should Apache and its support code duplicate that work? We can't do a better job than the OS and we end up with more code to maintain, most of it non-portable. If somebody wants to use ab to pound on a server with many concurrent connections, getting ab enough file descriptors is only one of their problems. Here are some others that they may or may not encounter depending on their OS and how they have changed the defaults: 1) configure enough file descriptors for the server (Apache has no such logic to adjust ulimit) 2) configure enough ephemeral ports on the client stack (on many OSs with the default configuration you can't run ab very long before ab can no longer connect to the server) 3) disable SYN attack code on the server stack so it doesn't get upset that so many SYNs for the same server port are coming from the same client 4) configure enough mbufs on the client stack so that the stack can actually create as many sockets as you are telling ab that it needs (on my FreeBSD 3.4 box I ended up recompiling the kernel to achieve this :( ) If Apache and support utilities have logic to adjust resource limits, developers can no longer adjust soft limits to force error paths. (There are always hard limits; by changing soft limits and not having Apache undo our change, we can easily simulate reaching the hard limit.) I hope this helps understand the big picture (at least as I see it). -- Jeff Trawick | [EMAIL PROTECTED] Born in Roswell... married an alien...
Re: [PATCH] Solaris sockets for support/ab.c (httpd-2_0_32-beta)
snip I hope this helps understand the big picture (at least as I see it). It does, and thank you for taking the time to explain this to me. My hope was to be able to foist off benchmarking onto someone else, which isn't really an option if too much configuration (i.e. scripting) is required. My frustration was that (as you confirmed) a benchmarking effort involves benchmarking the machine driving the benchmark (i.e. running 'ab') as much as anything else. Of course, this is less of an issue now that Solaris Intel is to be mothballed. Unfortunately, benchmarking (MTBF, Average and distributed response times, whether failure is graceful or not, suggested hardware platform for desired performance, etc, etc) quickly turns into a study in comparative operating systems. NT starts rejecting connections at around 58 concurrent connections; it turns out that NT is not a *true* multi-threaded OS at all but has an internal limit of 64 concurrencies, some of which it needs itself. My experience with other OS's is that they gracefully start rejecting connections at a much higher level of concurrency. Best regards
[PATCH] Solaris sockets for support/ab.c (httpd-2_0_32-beta)
By default, Solaris (at least, Solaris 7 for sparc) restricts the number of file handles that may be used. See the comments in the attached patch file for more details. I am a newbie, so please, only constructive criticism! Now that I finally have enough time, rather than patch each successive version of Apache, it seemed like a good idea to contribute these changes to the CVS trunk. Also, the patch instructions refer to 'new-httpd' which doesn't seem to exist. Neither do '[EMAIL PROTECTED]' or the other obvious choice for this patch '[EMAIL PROTECTED]'. So please excuse me if I have sent this patch to the wrong group. Of course, I have only made my best guess as to how to do this in a multi-OS situation (for sparc's the changes can be applied without the 'ifdef's). I have tested the original changes (i.e. no 'ifdef' s) on Solaris, but with an older version of Apache. Best regards, Martin Ramshaw ab.patch Description: Binary data