FreeBSD 6.1 Performance Tuning
Just a note for myself to tune FreeBSD OS for better performance.
Partitioning
Every partition of the disk will required different usage. For example webserver needs a lot reading and database needs read and write. Beside that, /var is a place to keep logs/transactions/mail and etc, require a lot of read and write too. It will be better if every disk partition for its own needs. Usually I do;
2G – /swap
2G – /var
5G – /www
10G – /db
5G – /usr
10G – /
the rest of the disk – /home
Size of a disk partition is depend on your own needs.
Syscontrol – sysctl
net.inet.tcp.sendspace/net.inet.tcp.recvspace – Tune this if you are running heavy traffic web server. Its control the send/receive buffer space for any TCP connection.
kern.ipc.somaxconn – Default somaxconn is 128, it’s not suitable running on heavy webserver, increase it to higher value cater your needs. Mine default is always set to 1024.
kern.maxfiles – If you running large database server, increase of kern.maxfiles will enhance your database server performance. Use kern.openfiles to determine current openfiles value on server.
Related posts:
- PostgreSQL Performance Tuning Compilation Performance Tuning PostgreSQL by Frank Wiles PostgreSQL 8.0 Performance Checklist...
- mount hfsplus (mac os file system) under Debian linux Have an external hard disk with hfsplus or hfs+ partition...
- Format Your External Hard Disk That Support Mac and Windows with Apple OSX If you have an external hard disk or thumb drive...
- Bind Error: “max open files (3520) is smaller than max sockets (4096)” Just notice one of the DNS server has the error...
- Forget / forgot / cannot remember root password On a FreeBSD server 1. reboot server 2. choose to...
- MySQL 5 Server Cannot Start on Apple Mac Leopard There were some problem during configuring MySQL5 Server on Leopard...
- How to Install FreeBSD 5.4 on Your Machine FreeBSD is an advanced operating system for x86 compatible (including...
- Exim, refused: too many connections One of our mailserver having problem last week. It’s caused...
- MySQL Quick Installation on FreeBSD Quick installation of MySQL Database on FreeBSD Server. Make sure...
- installing postgresql 8.2 on Leopard with macports postgresql! one of my favorite high performance open source db,...
December 6th, 2006 at 10:46 am
Besides what you have mentioned above, you should look into :-
In /etc/sysctl.conf
kern.maxfilesperproc
kern.maxprocperuid
kern.ipc.nmbclusters
In /boot/loader.conf
kern.ipc.maxpipekva
vm.kmem_size_max
kern.maxproc
kern.ipc.maxsockbuf
December 6th, 2006 at 11:09 am
oh btw thanks for the belated birthday greeting