Thread: web server optimization question
Status: Alpha
Brought to you by:
coroberti
From: jari p. <jar...@ho...> - 2007-09-02 18:59:17
|
First thank you for an excellent tool! slightly OT question: My main purpose for using curl-load is to load a device (stateful fw)=20 beetween clients and server. The question: how to optimize Apache and curl-load query parameters=20 to achieve max in terms of CAPS when retrieving small files from one httpd= server. Now with 1000 curl clients to Apache server I can get max 1200-1300 CAPS. in this test all clients are fetching the same 1k file. curl load config is= based on sample 10K example, but with 1000 clients. -how to optimize Apache (or would Lighthttpd be better ?) - what curl-load client options could be adjusted one increase connection= rate? =20 (again for this particular test I want to maximaze Connections/sec, and no= t necessary throughput or concurrent connections ) Jari _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Space= s. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=3Dcreate&wx_url=3D/friends.= aspx&mkt=3Den-us= |
From: Robert I. <cor...@gm...> - 2007-09-03 09:39:34
|
Hi Jari, On 9/2/07, jari pietila <jar...@ho...> wrote: > My main purpose for using curl-load is to load a device (stateful fw) > beetween clients and server. > > The question: how to optimize Apache and curl-load query parameters > to achieve max in terms of CAPS Default Apache configuration is really limiting. > -how to optimize Apache (or would Lighthttpd be better ?) I would suggest you to use nginx, which was found even better, than lighttpd. It has a Debian package and nice docs here, but you can use just the default conf http://wiki.codemongers.com/Main?action=show&redirect=Nginx > - what curl-load client options could be adjusted one increase connection > rate? We seen, that you do not need much connections to reach high CAPS. Something between 100 and 1000 is enough. Compile curl-loader with optimization as described: http://curl-loader.sourceforge.net/doc/faq.html#big-load http://curl-loader.sourceforge.net/high-load-hw/index.html Most probably, you do not need to fine-tune linux, whereas you can try. What is most important is to ensure persistance of the tcp-connections. curl-loader makes its best, therefore make sure, that server does as well. If your client machine has multiple-core or multiple CPU, you can also try an option to run it with -t <number> option, where the numbers to try are 2, 4, 8 With nginx I have seen 6000 - 8000 CAPS with a small file of 100-200 bytes and 200-400 curl-loader virtual clients, each with an established keep-alived connection. Highest number of CAPS you'll get as a guess, when TIMER_URL_COMPLETION = 0 TIMER_AFTER_URL_SLEEP = 0 Best wishes and report to the list you best experience. -- Sincerely, Robert Iakobashvili, coroberti %x40 gmail %x2e com ........................................................... http://curl-loader.sourceforge.net A web testing and traffic generation tool. |
From: jari p. <jar...@ho...> - 2007-09-07 03:12:31
|
Robert, I did some experimenting and can share the results so far: =20 - with ligthttpd and minimal server tuning, I got around 3300 CAPS with 100= 0 virtual clients. (load-curl 0.41 re-compiled with optimization) compared to 1200 with A= pache. =20 Then the good news: My client in this test was is dual-core P4 2.8Ghz, 1GB RAM, Fedora 5= =20 and with -t 2 option there was almost linear scaling leading about 600= 0 CAPS! Very impressive, thanks for pointing this out. =20 - I then switched to nginx, and was able to reach 8000 CAPS with -t= 2 and 1000 virtual clients. (no change in client configuration ) But there is also a change in server behavior, lighttpd does NOT use pers= istent connections and closes each TCP connection (TCP FIN server ->client ). This is actually the kind of behavior, I wanted to see: NO persistence, thus creating load on DUT that needs to track TCP sess= ion creation and closing. =20 Nginx with default settings has persistence, (and not sure if there is directive to make it not to do so), so this seems to explain the higher CAPS number. I also experimented a little with the number of virtual clients,=20 but I got about the same results with 256 clients, and performance started to degrade around 1500 clients. =20 - Finally, I tried configuration where client closing the connectio= n, but with this=20 I got much lower CAPS with both lighttpd and nginx. -jari=20 _________________________________________________________________ Connect to the next generation of MSN Messenger=A0 http://imagine-msn.com/messenger/launch80/default.aspx?locale=3Den-us&sourc= e=3Dwlmailtagline= |
From: jari p. <jar...@ho...> - 2007-09-07 03:16:48
|
Robert, I did some experimenting and can share the results so far: =20 - with ligthttpd and minimal server tuning, I got around 3300 CAPS with 100= 0 virtual clients. (load-curl 0.41 re-compiled with optimization) compared to 1200 with A= pache. =20 Then the good news: My client in this test was is dual-core P4 2.8Ghz, 1GB RAM, Fedora 5 and with -t 2 option there was almost linear scaling leading about 6000 CA= PS! Very impressive, thanks for pointing this out. =20 - I then switched to nginx, and now got 8000 CAPS with -t 2 and 1000 v= irtual clients. (no change in client configuration ) But there was also a change in server behavior, lighttpd does NOT use pers= istent connections and closes each TCP connection (TCP FIN server ->client ). This is actually the kind of behavior, I wanted to see: NO persistence, thus creating load on DUT that needs to track TCP session = creation and closing. =20 Nginx with default settings has persistence, (and not sure if there is di= rective to make it not to do so), so this seems to explain the higher CAPS number. I also experimented a little with the number of virtual clients, but I got = about the same results with 256 clients, and performance started to degrade around 1500 clients. - Finally, I tried configuration where client closes the connection,=20 but with this I got much lower CAPS with both lighttpd and nginx. _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=3Dwindows+vista&mkt=3Den-US&form=3DQBR= E= |
From: Robert I. <cor...@gm...> - 2007-09-09 09:15:26
|
Hi Jari, On 9/7/07, jari pietila <jar...@ho...> wrote: > My client in this test was is dual-core P4 2.8Ghz, 1GB RAM, Fedora 5 > and with -t 2 option there was almost linear scaling leading about 6000 > CAPS! > - I then switched to nginx, and now got 8000 CAPS with -t 2 and 1000 > virtual clients. > The numbers are matching our experience. I also experimented a little with the number of virtual clients, but I got > about the same results with 256 clients, > and performance started to degrade around 1500 clients. > Y, indeed to get more CAPS , its about the same with 200 - 1000 clients - Finally, I tried configuration where client closes the connection, > but with this I got much lower CAPS with both lighttpd and nginx. > It is also matching our experiments. If you see idle CPU remaning at your loading machine, you can try adding more servers. Else, you can scale either by increasing the CPUs/memory of the client and server machines or by increasing their numbers. http://curl-loader.sourceforge.net/high-load-hw/index.html Thanks and best wishes. Sincerely, Robert Iakobashvili, coroberti %x40 gmail %x2e com ........................................................... http://curl-loader.sourceforge.net A web testing and traffic generation tool. |
From: Aleksandar L. <al-...@no...> - 2007-09-07 08:26:03
|
Hi, On Fre 07.09.2007 03:12, jari pietila wrote: >Robert, > >I did some experimenting and can share the results so far: Nice to share your experience ;-), thanks. >- with ligthttpd and minimal server tuning, I got around 3300 CAPS with > 1000 virtual clients. > (load-curl 0.41 re-compiled with optimization) compared to 1200 > with Apache. > > Then the good news: > My client in this test was is dual-core P4 2.8Ghz, 1GB RAM, Fedora 5 > and with -t 2 option there was almost linear scaling leading about 6000 CAPS! > Very impressive, thanks for pointing this out. > > - I then switched to nginx, and was able to reach 8000 CAPS > with -t 2 and 1000 virtual clients. > (no change in client configuration ) Cool ;-) > But there is also a change in server behavior, lighttpd does NOT use > persistent connections and closes each TCP connection (TCP FIN server > ->client ). > This is actually the kind of behavior, I wanted to see: > NO persistence, thus creating load on DUT that needs to track TCP > session creation and closing. I'am not a fan of lighty but to be fair have you looked into: http://trac.lighttpd.net/trac/wiki/Docs%3APerformance > Nginx with default settings has persistence, > (and not sure if there is directive to make it not to do so), > so this seems to explain the higher CAPS number. Afaik there is no option to switch off the keep-alive but you can tune it: http://wiki.codemongers.com/NginxHttpCoreModule#keepalive_timeout > I also experimented a little with the number of virtual clients, > but I got about the same results with 256 clients, > and performance started to degrade around 1500 clients. > > - Finally, I tried configuration where client closing the connection, but with this > I got much lower CAPS with both lighttpd and nginx. Have you tried to turn on/off tcp_{nodelay,nopush), yust for info?! http://wiki.codemongers.com/NginxHttpCoreModule#tcp_nodelay BR Aleks |
From: Robert I. <cor...@gm...> - 2007-09-09 09:17:08
|
Aleks, On 9/7/07, Aleksandar Lazic <al-...@no...> wrote: > > I'am not a fan of lighty but to be fair have you looked into: > > http://trac.lighttpd.net/trac/wiki/Docs%3APerformance > > > Nginx with default settings has persistence, > > (and not sure if there is directive to make it not to do so), > > so this seems to explain the higher CAPS number. > > Afaik there is no option to switch off the keep-alive but you can tune > it: > > http://wiki.codemongers.com/NginxHttpCoreModule#keepalive_timeout > > > I also experimented a little with the number of virtual clients, > > but I got about the same results with 256 clients, > > and performance started to degrade around 1500 clients. > > > > - Finally, I tried configuration where client closing the > connection, but with this > > I got much lower CAPS with both lighttpd and nginx. > > Have you tried to turn on/off tcp_{nodelay,nopush), yust for info?! > > http://wiki.codemongers.com/NginxHttpCoreModule#tcp_nodelay > Interesting links, thanks. -- Sincerely, Robert Iakobashvili, coroberti %x40 gmail %x2e com ........................................................... http://curl-loader.sourceforge.net A web testing and traffic generation tool. |