LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-22-2009, 11:37 AM   #1
jampy
LQ Newbie
 
Registered: Dec 2009
Posts: 1

Rep: Reputation: 0
TCP tuning for a server with very short HTTP connections


Hello everybody.

I run a server that currently handles about 25-30 HTTP requests per second and seems to have reached it's limit even though the CPU is 70% in IDLE.

The server is running Apache 2.2.3 on Debian 4 and 99% of the requests are routed through FastCGI to a dedicated process written in FreePascal. This process is handling dynamic requests with 30 threads. Requests are handled in about 50ms average.

The HTTP requests come from lots of different clients that maybe generate 5 requests and then aren't seen anymore.

That's why Apache's KeepAliveTimeout timeout is set to 2 seconds, as to avoid lots of unnecessary open connections.

Those 2 seconds seem to be a key point because consecutive requests within those 2 seconds are handled immediately, while requests after longer intervals take at least 5 seconds (the FastCGI process however reports only 4ms processing time!).

That makes me think that I have to do some TCP tuning of my Linux server or perhaps Apache because it seems to me that the server's connection limit or anything like that has been reached.

"netstat" shows about 2000 connection, about the half of them being in TIME_WAIT state.

I tried with "sysctl -w net/ipv4/tcp_max_orphans=500" but that didn't change anything.

Can somebody please give me some advice how to further analyze and perhaps improve the situation?

Lots of thanks in advance!


PS: CPU is an Athlon X2 Dual Core 5600+ running at 32bits.
 
Old 12-24-2009, 09:15 AM   #2
1jnike
Member
 
Registered: Jan 2006
Location: UK
Distribution: Fedora,Mandriva,Debian,Suse,Solaris
Posts: 135

Rep: Reputation: 17
Hi jampy,

I may be touching base here, but you may need to increase the current memory installed on your system. Just a thought!!

I hope this is of help

Jnike
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TCP tuning in Linux for non-blocking socket connection over long-path WAN mmmike123 Linux - Networking 0 04-23-2009 01:32 PM
All connections drop after short burst? Gateway notebook mx3225 Mr_Fixit Linux - Wireless Networking 3 09-01-2008 04:25 PM
how many TCP connections at a time? hegdeshashi Linux - Networking 5 01-05-2006 11:19 PM
Need a way to limit TCP connections ewerta Linux - Networking 1 07-25-2005 03:54 PM
tune TCP stack for HTTP connections naijaguy Linux - General 0 02-01-2005 06:42 PM


All times are GMT -5. The time now is 10:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration