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:

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:

ulimit -HSn 4096
 
ab2 -c 4000 -n 4000 http://test
netstat -napt | grep TIME_WAIT | wc
Herramientas personales