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.

We have some server with a huge amount of visitors (every minute, every day). Basically we had a nice fine-tuned sysctl config for this purpose. (If you don't modify it, it starts to behave strangely). I'd like to ask the community if you could provide me one which.. well.. optimized for this purpose.

Edit:
Like maximizing open file limits and so on. That's what I meant.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

define large activity? large number of files open? large files being transferred? lots of slow clients? This is taken off a machine that runs nginx serving 900+mb/sec of 120k or smaller images on a Quad Core Xeon 2.4. The settings on a server that does streaming content are much different. Each machine config is different based on the requirements. Blindly implementing these could make your performance better or worse.

fs/file-max=60000
fs/dir-notify-enable=0

net/ipv4/tcp_keepalive_time=600
net/core/rmem_max=262143
net/core/rmem_default=262143
net/core/wmem_max=262143
net/core/wmem_default=262143
net/ipv4/tcp_sack=0
net/ipv4/tcp_timestamps=0

net/nf_conntrack_max=262143
net/ipv4/tcp_frto=0

net.ipv4.tcp_sack=1
net.ipv4.tcp_timestamps=1
net.ipv4.tcp_wmem = 4096 65536 4194304
net.ipv4.tcp_rmem = 4096 87380 4194304

net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_tw_recycle = 1
net.core.wmem_max = 16777216
net.core.rmem_max = 16777216
net.core.wmem_default = 16777216
net.core.rmem_default = 16777216
net.core.netdev_max_backlog = 262144
net.core.somaxconn = 262144

net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2

While the information on this page is somewhat old, much of it still applies:

http://www.acc.umu.se/~maswan/linux-netperf.txt www.ibm.com/developerworks/linux/library/l-hisock.html slaptijack.com/system-administration/linux-tcp-performance-tuning/

share|improve this answer
    
Basically it's a machine which serves out a lot of dynamic webpage requests. The page uses ajax/php. | The other one serves out about 1k image every 30 min so to say. ... What would you say for these? –  Shiki Jul 3 '10 at 7:43
    
Does that machine have a NIC which features TCP offloading? –  Matt Simmons Jul 3 '10 at 15:23
    
Thaaat is a really good question. I think it does. It's a very high performance dedicated server from a German provider. (If you tell me how could I check it, I'll report back ASAP!) –  Shiki Jul 3 '10 at 17:05
    
what problems are you experiencing with your current setup that the host isn't fixing? –  karmawhore Jul 3 '10 at 17:37
    
Basically there was some strange errors by lighttpd and the running server-side application kept crashing. The links + config helped me. Thanks. –  Shiki Jul 3 '10 at 18:43

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.