Messages in this thread | | | Date | Tue, 16 Feb 1999 17:25:46 -0500 (EST) | From | Phillip Ezolt <> | Subject | Kernel Tuning for Apache on Linux |
| |
Hi all, I'm trying to get a reasonable benchmark of apache on Linux.
I can currently get a result of ~60 ops/second. However, this is far below what this class of machine be receiving. ~600 ops/second would be a more reasonable number, and even that is on the low end.
The CPU is about 70% idle for most of the test. The client receives "ECONNREFUSED" when it tries to connect to the box as the test is heating up.
This test particularly has a very large number of processes in the "TIME_WAIT" state.
The server machine is a 266 Mhz PII linux box with 256Meg of memory. It has a FDDI network card, so network bandwidth is not a problem. FDDI also has the nice property of no collisions, so that also isn't an issue.
OS version: Redhat 5.2 Kernel Version: 2.2.1 Apache Version: 1.3.4
What kind of kernel tunings do I need for optimal performance?
I have changed the values in /usr/src/linux/include/net/tcp.h to: #define TCP_HTABLE_SIZE 2048 (was 512) #define TCP_LHTABLE_SIZE 128 (was 32) #define TCP_BHTABLE_SIZE 2048 (was 512)
I have changed /proc/sys/fs/inode-max to 130712 (was 8192) I have changed /proc/sys/net/ipv4/ip_local_port_range to 1024 32678 (was 1024 4999)
File-nr does not appear to be a problem. During a test, about ~400 of the possible 4096 file descriptors are used.
On digital Unix, some of the tunnings used are:
inet: ipqs=7, tcbhashnum=7, tcbhashsize=4096, tcbquicklisten=1, tcp_sendspace=60000,tcp_recvspace=60000
net: netisrfair=1, netisrwakeupthreshold=256, netisrthreads=3
socket: somaxconn=32767, sominconn=32767, umc=1
proc: max-proc-per-user=1024, maxusers=1024, max-threads-per-user=4096, per-proc-data-size=0x40000000000, max-per-proc-data-size=0x40000000000, max-per-proc-address-space=0x4000000000, per-proc-address-space=0x40000000000
vm: ubc-maxpercent=80, vm-mapentries=50000, vm-vpagemax=131072, dump-user-pte-pages=1, vm-maxvas=0x40000000000
Does any one know the equivalents for linux?
Thanks, --Phil
Digital/Compaq: High Performance Servers/Benchmark Performance Engineering Phillip.Ezolt@compaq.com ezolt@perf.zko.dec.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |