LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

How to tune Linux kernel for high volume media server?

Change to 'deadline' I/O scheduler

  • From command line (change the device ‘sda’ to appropriate device):
echo “deadline” > /sys/block/sda/queue/scheduler
  • kernel parameter, change /boot/grub/menu.lst, add kernel parameter
elevator=deadline

Change VM parameters

There are two variables which control the behaviour of VM flushing and allocation and affect network and disk performance

  • vm.dirty_background_ratio
  • vm.dirty_ratio

To set these values from command line

echo 20 > /proc/sys/vm/dirty_background_ratio
echo 60 > /proc/sys/vm/dirty_ratio

to make it permanent, edit /etc/sysctl.conf:

vm.dirty_background_ratio = 20
vm.dirty_ratio = 60

Increase readahead

To get current readahead value:

$ blockdev --getra /dev/sda
256

To increase it to a higher value like 16K:

$ blockdev --setra 16384 /dev/sda

Disable updating access time stamp for file system

Edit /etc/fstab, remove “atime” attribute if there is, add “noatime” attribute.

 
litespeed/wiki/linux_kernel_tune.txt · Last modified: 2009/03/04 13:25 by mistwang
 
© Copyright 2003-2007 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.