Just found this very good article about optimizing servers.
This entry was written by , posted on October 12, 2009 at 1:20 pm, filed under Optimization and tagged ionice, nice, ulimit. Leave a comment or view the discussion at the permalink.
The default value of “Reserved block count” takes 5% of usable disk. On a large fs like 813G, it represents about 40G.
These blocks are reserved to the super user to recover from situations where user processes fill up filesystems.
It is absolutely safe to reduce this space to one hundred or so MB.
$ df -h /dev/sda4 /dev/sda4 813G 418G 354G 55% /home
Before the tuning, we have 354G free.
$ tune2fs -l /dev/sda4 ... Reserved block count: 10816865 ...
Change this number to 20000.
The blocksize is 4096, 20000 blocks represent about 80MB.
$ tune2fs -r20000 /dev/sda4 ... Reserved block count: 20000 ...
$ df -h /dev/sda4 /dev/sda4 813G 418G 395G 52% /home
We now have a gain of 40GB of free space!
This entry was written by , posted on June 30, 2009 at 9:55 am, filed under Optimization, Uncategorized and tagged filesystem, tune2fs. Leave a comment or view the discussion at the permalink.
While reading articles about optimization, I read about the accf_http module.
The man page of the module is here, where you can read:
The utility of accf_http is such that a server will not have to context switch several times before performing the initial parsing of the request.
To load this module, use the following command:
# kldload accf_http
To load it at boot time, add the following line in /boot/loader.conf:
accf_http_load="YES"
To check if the module is loaded, use the command kldstat:
# kldstat Id Refs Address Size Name 1 4 0xc0400000 906518 kernel 2 1 0xc0d07000 6a32c acpi.ko 3 1 0xc5e65000 2000 accf_http.ko
This entry was written by , posted on March 12, 2009 at 6:04 am, filed under Optimization and tagged FreeBSD. Leave a comment or view the discussion at the permalink.