Difference between revisions of "Linux Tuning"

From ElphelWiki
Jump to: navigation, search
(Virtual memory subsystem tuning)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
Data about kernel tuning will be collected here.
 
Data about kernel tuning will be collected here.
 +
==Network tuning==
 +
To allow receive of multicast packets it is necessary to set route rules for multicast:
 +
 +
# route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
 +
 +
To avoid packet lossing it is necessary to increase a size of socket receive buffer to 1500000 bytes (tested with [[Recorder|ElphelOgm]] on Intel(R) Pentium(R) 4 CPU 3.20GHz with 100Mbit ethernet card and multicast flow from the camera about 6MB/s).
 +
 +
# echo 1500000 > /proc/sys/net/core/rmem_max
 +
# echo 1500000 > /proc/sys/net/core/rmem_default
 +
==Virtual memory subsystem tuning==
 +
===For Linux version 2.4.===
 +
# echo 30 10 0 0 4 3000 70 0 0 > /proc/sys/vm/bdflush
 +
===For Linux version 2.6.===
 +
# echo 5 > /proc/sys/vm/dirty_background_ratio
 +
# echo 70 > /proc/sys/vm/dirty_ratio
 +
# echo 4 > /proc/sys/vm/dirty_writeback_centisecs
 +
# echo 3000 > /proc/sys/vm/dirty_expire_centisecs
  
 
==Links==
 
==Links==

Latest revision as of 10:56, 2 January 2006

Data about kernel tuning will be collected here.

Network tuning

To allow receive of multicast packets it is necessary to set route rules for multicast:

# route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

To avoid packet lossing it is necessary to increase a size of socket receive buffer to 1500000 bytes (tested with ElphelOgm on Intel(R) Pentium(R) 4 CPU 3.20GHz with 100Mbit ethernet card and multicast flow from the camera about 6MB/s).

# echo 1500000 > /proc/sys/net/core/rmem_max
# echo 1500000 > /proc/sys/net/core/rmem_default

Virtual memory subsystem tuning

For Linux version 2.4.

# echo 30 10 0 0 4 3000 70 0 0 > /proc/sys/vm/bdflush

For Linux version 2.6.

# echo 5 > /proc/sys/vm/dirty_background_ratio
# echo 70 > /proc/sys/vm/dirty_ratio
# echo 4 > /proc/sys/vm/dirty_writeback_centisecs
# echo 3000 > /proc/sys/vm/dirty_expire_centisecs

Links

Old discussions on SourceForge

Linux Tuning Guide (for 2.4 kernels)

Red Hat Enterprise Linux 4: Reference Guide: Directories within /proc/