Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a linux machine with a dummy HTTP server on it. It accepts a certain number of connections/second. Neither the CPU (it is a multicore) nor the memory nor IO are exhausted. What else can be there that is limiting the connections/second? What should I look for? Thanks for any answers

share|improve this question
    
What http server are you using? –  Caleb Apr 11 '11 at 12:29
    
lighttz is the http server that was used. I also tried a small code on top of libevent that spews out the same response to each request. In either case, no resource seems to be exhausted yet the connections per second does not go up. There should be SOME hardware resources that is exhausted? Or am I missing something here –  kakinada Apr 11 '11 at 12:37
    
I started using a tool that shows the time elapsed between sending SYN to the server and receiving SYN_ACK. It also shows the time elapsed from sending the first byte of GET to the last byte of received response. If a server handles 10000 connections/second, then should I expect it to server one connection 1/10000 s i.e.0.1 ms. In this case, the dummy server is handling 40000 connections / second. I would expect it to handle a connection in 1/40000 = 0.025 ms. However, from SYN to SYN-ACK, it takes 100 ms. How is that passible? Appreciate any inputs –  kakinada Apr 14 '11 at 12:50
    
Sounds like your network stack might be messed up. What does it look like for other (non HTTP/port80) things? –  Caleb Apr 14 '11 at 19:29
    
I agree with you. The http server accepts connections and sends a hardcoded HTTP response to any input. It is thus, more of a a dummy sitting on top of TCP/IP stack. This means TCP/IP stack has problems. I ran tests using expensive tools and found that as the response time increases, the performance decreases. Nothing surprising here, except the cause of the response time increase is unclear. I wrote a script to capture recvq/sendq in netstat.It always shows sockets in time_Wait with the q-size as 0. What else can be done to discover the cause of the decrease in resposne time? –  kakinada Apr 15 '11 at 11:39

2 Answers 2

I'm sorry if it's stating the obviously but ... bandwidth. install iftop and run it on the main interface over the console iftop -i eth1.

share|improve this answer
    
Sorry I should have mentioned bandwidth also. It does not seem to be an issue as I am on 1G NIC and max bandwidth is 400kbps. I also tried to check for interrupts saturating the processor but it does not seem to be so –  kakinada Apr 11 '11 at 12:35
    
I'd have to agree with Caleb, unless you can reproduce it over protocols/services, then it's likely to be HTTP config related. –  Jonathan Ross Apr 11 '11 at 13:05

You almost certainly are just hiting a configuration limitation, not a hardware resources one. I don't know much about lighttz, but here are some things to look for in the configurations:

  • How many concurrent threads it is allowed to run?
  • How many open ports it can have open?
  • What is the timeout before a port is closed?
  • Is it properly closing the port/connection after serving data?
  • Are there user level restrictions on open ports?
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.