Optimize maximum throughput of the modified Seagate Dockstar

Presents the same content as „Maximaldurchsatz der modifizierten Seagate Dockstar optimieren“
Here I present settings which are to maximise througput with sequential read and write operations on network connections at the expense of the virtual memory subsystem. The dockingstation FreeAgent DockStar Network Adapter is an embedded system, on which using a bootstrap script a Linux can be installed. It’s very similar to the plugcomputers SheevaPlug.


Everything was tested under Debian GNU/Linux „lenny“ after execution of thebootstrap script from Jeff Doozan.

Format disk with XFS and mount permanently

After installation with the bootstrap script you only need the XFS filesystem. The corresponding tools can be installed using apt-get install xfsprogs xfsdump. If not already done, format the disk with XFS.

mkfs.xfs /dev/sdX

Then create the necessary entry in the file /etc/fstab using an editor.

/dev/sdX   /mnt    xfs     noatime,logbufs=8,allocsize=128m        0       2

The option allocsize denotes how much diskspace is reserved in advance when writing to the filesystem. An explanation can be found in my blogarticle, hint 1 (german)

Create /etc/rc.local.throughput

Create the file /etc/rc.local.througput with an editor and the following content.

blockdev --setra 16384 /dev/sdX  # set the readahead value to 16MiB
ifconfig eth0 txqueuelen 5000  # buffer 5000 outgoing packets in memory
echo deadline > /sys/block/sdX/queue/scheduler # use alternative I/O-scheduler 

After this, make the file executable.

chmod 700 /etc/rc.local.throughput 

Now add /etc/rc.local.throughput with an editor to the file /etc/rc.local prior to the line exit 0.

Add to /etc/sysctl.conf

Append to the file /etc/sysctl.conf using an editor.

# % allocation of memory for I/O-Requests, before data is written immediatly to disk
vm.dirty_ratio=8
# % allocation of memory for I/O-Requests, before data is written in the background to disk
vm.dirty_background_ratio=5
# use memory for I/O-Cache first, rather then applications, when possible
vm.vfs_cache_pressure=50
# swap out unused applications, instead of flushing I/O-Cache
vm.swappiness=100
# buffer up to 5000 received packets in memory, to avoid packetloss
net.core.netdev_max_backlog=5000
# disable TCP-Extensions, to save space in TCP-Header
net.ipv4.tcp_sack=0
net.ipv4.tcp_timestamps=0
# reuse sockets faster
net.ipv4.tcp_fin_timeout=10
net.ipv4.tcp_tw_recycle=1

Load new settings

Activate the settings without reboot as follows, or do a reboot.

sysctl -p
/etc/rc.local.throughput

Hints for special applications

samba:

Set „socket options = TCP_NODELAY SO_SNDBUF=65536 SO_RCVBUF=65536 SMBwriteraw SMBreadraw“

Schreibe einen Kommentar

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.