<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Courier New, Courier, monospace">Hey all, I'm running into performance issues with nginx as a load balancer. I have three web servers and one load balancer server. All four of them have nginx installed and setup.<br> <br> Using a stress testing tool (jMeter) I am able to get 220 requests per second from any of the three web servers. When I go to the load balancer I cannot break 180/s. <br> <br> All four of the servers are on the same /24 network, the stress test server is on another /24 network.<br> <br> Any ideas on what it could be? <br> <br> </font> <div class="moz-signature">-- <br> <font style="font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal;"> Clint Priest<br> </font><br> </div> </body> </html>
on 04.09.2008 00:40
on 04.09.2008 08:14
On Wed, Sep 03, 2008 at 05:27:14PM -0500, Clint Priest wrote: > Hey all, I'm running into performance issues with nginx as a load > balancer. I have three web servers and one load balancer server. All > four of them have nginx installed and setup. > Using a stress testing tool (jMeter) I am able to get 220 requests per > second from any of the three web servers. When I go to the load > balancer I cannot break 180/s. > All four of the servers are on the same /24 network, the stress test > server is on another /24 network. > Any ideas on what it could be? What do you use as backends ? If backends are java-based, then it can be java accept connection overhead: nginx currently does not use persistent connection to backends. Also, nginx as intermediate link will always add some delay, however, I do not think that this delay can be so huge on so low request rate (180r/s vs 220r/s).
on 04.09.2008 10:53
Clint Priest wrote: > All four of the servers are on the same /24 network, the stress test > server is on another /24 network. > > Any ideas on what it could be? i have a similar setup as you Clint. If the backend servers are indeed pushing that number of requests then you should get at least that at the front end. What i would look at is: - nginx settings (enough workers?) - any errors in the nginx error (file handles?) Turn off the keep-alive settings on your JMeter test (which i believe is done by default anyway) so you can test on a level playing field.
on 04.09.2008 16:44
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Courier New, Courier, monospace">I just checked on the
error log, no errors are being produced. I've got the Load
balancer
setup with:<br>
<br>
worker_processes 5;<br>
<br>
error_log logs/error.log;<br>
<br>
events {<br>
worker_connections 2048;<br>
}<br>
<br>
I have nginx on all three backend servers as well so everything being
used is nginx from the load balancer to the web servers, but I still
can't break 180/s.<br>
<br>
If I have three backend web servers that each can do 220/s should I be
able to expect somewhere around 400-600/s out of the nginx load
balancer?<br>
<br>
Thanks,<br>
<br>
-Clint<br>
<br>
</font><br>
Alan Williamson wrote:
<blockquote cite="mid:48BFA021.7000706@blog-city.com" type="cite">Clint
Priest wrote:
<br>
<blockquote type="cite">All four of the servers are on the same /24
network, the stress test server is on another /24 network.
<br>
<br>
Any ideas on what it could be? </blockquote>
<br>
i have a similar setup as you Clint. If the backend servers are
indeed
pushing that number of requests then you should get at least that at
the front end.
<br>
<br>
What i would look at is:
<br>
<br>
- nginx settings (enough workers?)
<br>
- any errors in the nginx error (file handles?)
<br>
<br>
<br>
Turn off the keep-alive settings on your JMeter test (which i believe
is done by default anyway) so you can test on a level playing field.
<br>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font
style="font-family: Verdana; font-style: normal; font-variant: normal;
font-weight: normal; font-size: 13px; line-height: normal;
font-size-adjust: none; font-stretch: normal;">
Clint Priest<br>
</font><br>
</div>
</body>
</html>
on 29.09.2008 15:11
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Courier New, Courier, monospace">Just thought I'd post the
final resolution to this. I'm running all of this in virtualized
environment with VMWare and didn't have the vmware-tools
installed.
Now that they are installed the load balancer is saturating the
bandwidth serving simple PHP pages from three backend servers.<br>
<br>
Getting roughly 660/s through the load balancer.<br>
</font><br>
Clint Priest wrote:
<blockquote cite="mid:48BFF224.8000208@resultsgeneration.com"
type="cite">
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<font face="Courier New, Courier, monospace">I just checked on the
error log, no errors are being produced. I've got the Load
balancer
setup with:<br>
<br>
worker_processes 5;<br>
<br>
error_log logs/error.log;<br>
<br>
events {<br>
worker_connections 2048;<br>
}<br>
<br>
I have nginx on all three backend servers as well so everything being
used is nginx from the load balancer to the web servers, but I still
can't break 180/s.<br>
<br>
If I have three backend web servers that each can do 220/s should I be
able to expect somewhere around 400-600/s out of the nginx load
balancer?<br>
<br>
Thanks,<br>
<br>
-Clint<br>
<br>
</font><br>
Alan Williamson wrote:
<blockquote cite="mid:48BFA021.7000706@blog-city.com"
type="cite">Clint
Priest wrote: <br>
<blockquote type="cite">All four of the servers are on the same /24
network, the stress test server is on another /24 network. <br>
<br>
Any ideas on what it could be? </blockquote>
<br>
i have a similar setup as you Clint. If the backend servers are
indeed
pushing that number of requests then you should get at least that at
the front end. <br>
<br>
What i would look at is: <br>
<br>
- nginx settings (enough workers?) <br>
- any errors in the nginx error (file handles?) <br>
<br>
<br>
Turn off the keep-alive settings on your JMeter test (which i believe
is done by default anyway) so you can test on a level playing field.
<br>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font
style="font-family: Verdana; font-style: normal; font-variant: normal;
font-weight: normal; font-size: 13px; line-height: normal;
font-size-adjust: none; font-stretch: normal;">
Clint Priest<br>
</font><br>
</div>
</blockquote>
</body>
</html>