Server
De JarfilWiki
Contenido |
Temas
PHP + fcgid + suexec + apc/eaccelerator
TODO: Share cache among fcgid processes
TODO: Access cache stats for other users from server-admin user
Snippets
fix mail file dates
#!/bin/bash IFS=$'\n' for f in `<l` ; do DATE=`grep ^Date: "$f" | head -n1` DATE="${DATE:6}" touch -d "$DATE" "$f" done
Linux server
Enable more TCP connections
Base performance test:
ab2 -c 1000 -n 1000 http://test netstat -napt | grep TIME_WAIT | wc
Tutorials:
- http://www.cs.uwaterloo.ca/~brecht/servers/ip-sysctl.txt
- http://ipsysctl-tutorial.frozentux.net/ipsysctl-tutorial.html
Faster TIME_WAIT:
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle echo "3" > /proc/sys/net/ipv4/tcp_fin_timeout ab2 -c 1000 -n 1000 http://test netstat -napt | grep TIME_WAIT | wc
More simultaneous connections:
- http://man.chinaunix.net/newsoft/squid/Squid_FAQ/FAQ_long.html#ss11.4
- solves "Too many open files"
ulimit -HSn 4096 ab2 -c 4000 -n 4000 http://test netstat -napt | grep TIME_WAIT | wc
