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.
As you may know, when using memcached on 32-bit servers, processes can only address 4GB of virtual memory making the memcached daemon handle only 2 or 3 Gb of memory.
If you want to address more memory, you need to launch multiple memcached daemons.
I wrote an rc script , mmemcached, for FreeBSD to manage this.
To use it, you need to add this in /etc/rc.conf:
mmemcached_enable="YES" mmemcached_servers="1 2" mmemcached_user="nobody" mmemcached_args="-c 8192 -t 2 -m 2048 -d"
Copy the mmemcached script in /usr/local/etc/rc.d for example and launch it with the start argument. With the above configuration it will launch two memcached daemons listening on ports 11211 and 11212 (mmemcached_servers parameter) with 2Gb of memory.
Details of the rc.conf configuration:
Download the script on github.
This entry was written by , posted on October 2, 2008 at 12:23 pm, filed under Distro, Uncategorized and tagged FreeBSD, memcached. Leave a comment or view the discussion at the permalink.
The dmidecode command gives you all informations available about your memory.
With the special parameter “-t 16″, you can see the maximum (physical) memory that your server can have:
$ dmidecode -t 16 # dmidecode 2.8 SMBIOS 2.4 present. Handle 0x1000, DMI type 16, 15 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: Multi-bit ECC Maximum Capacity: 32 GB Error Information Handle: Not Provided Number Of Devices: 8
Here we can see that your server can handle up to 32Gb
To know which slots are used or not use the “-t 17″ flag.
dmidecode -t 17 | grep Size
Size: 2048 MB
Size: 2048 MB
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
This entry was written by , posted on August 4, 2008 at 8:42 am, filed under Uncategorized and tagged dmidecode, memory. Leave a comment or view the discussion at the permalink.