Strict Standards: Declaration of RSS::DoAction() should be compatible with CMSModule::DoAction($name, $id, $params, $returnid = '') in /home/xandaorg/public_html/modules/RSS/RSS.module.php on line 0

Strict Standards: Non-static method PageInfoOperations::LoadPageInfoByContentAlias() should not be called statically in /home/xandaorg/public_html/index.php on line 154

Warning: Cannot modify header information - headers already sent by (output started at /home/xandaorg/public_html/modules/RSS/RSS.module.php:0) in /home/xandaorg/public_html/index.php on line 299
Xanda - /dev/project - Performance Tuning for Linux swap partition

Tuning swap partition my result into a good system performance. You can tune swap by editing /etc/fstab file.

For example if you have two partitions as follows:

Now Linux system will only use one partition at a time. It will use next partition only if first partition exhausted. Each swap area has a priority, either high or low. The default priority is low. Within the low-priority areas, newer areas are even lower priority than older areas.

According to swap man page: All priorities set with swapflags are high-priority, higher than default. They may have any non-negative value chosen by the caller. Higher numbers mean higher priority. Swap pages are allocated from areas in priority order, highest priority first. For areas with different priorities, a higher-priority area is exhausted before using a lower-priority area. If two or more areas have the same priority, and it is the highest priority available, pages are allocated on a round-robin basis between them.

This may result into performance issue as a new process needs to be swapped to disk it may have to wait until another process is swapped out. So open your /etc/fstab:

# vi  /etc/fstab

Find out line that read as follows:

/dev/sdb3    swap      swap    default           0 0
/dev/sdc3 swap swap default 0 0

Replace it as follows:

/dev/sdb3    swap      swap    pri=0           0 0
/dev/sdc3 swap swap pri=0 0 0

Restart the system or turn on and off swap to take effect with swapon command:

# sync;sync;swapoff -a
# swapon -a

The result of above tuning is that your system should able to use any one of the swap partition independently. Please note that this hack is only useful if your system uses swap.