Atom feed of this document
 

 General System Tuning

Rackspace currently runs Swift on Ubuntu Server 10.04, and the following changes have been found to be useful for our use cases.

The following settings should be in /etc/sysctl.conf:



# disable TIME_WAIT.. wait..
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_tw_reuse=1

# disable syn cookies
net.ipv4.tcp_syncookies = 0

# double amount of allowed conntrack
net.ipv4.netfilter.ip_conntrack_max = 262144

    

To load the updated sysctl settings, run sudo sysctl -p

A note about changing the TIME_WAIT values. By default the OS will hold a port open for 60 seconds to ensure that any remaining packets can be received. During high usage, and with the number of connections that are created, it is easy to run out of ports. We can change this since we are in control of the network. If you are not in control of the network, or do not expect high loads, then you may not want to adjust those values.

Another helpful tuning parameter on slower systems that helps to ensure enough time is allowed for service restarts is the -k N (or --kill-wait N ) parameter of swift-init. This allows you to change the default (15 second) time (N, in seconds) that swift waits for processes to die and notably you can pass --run-dir flag with swift-init to set where PID's will be stored.


loading table of contents...