minimise disk IO on usb stick

This forum is for all other ARMv5 devices

minimise disk IO on usb stick

Postby dolphs » Fri Jul 08, 2011 7:27 pm

Hi I just flashed my pink pogoplug with " Linux server 2.6.31.6_SMP_820 #100 SMP Sun May 29 04:53:45 EDT 2011 armv6l ARMv6-compatible processor rev 5 (v6l) Oxsemi NAS GNU/Linux ".

Yet I like to limit disk writes to the USB stick.

So first thoughts were :

limit writes
------------
rm -f /etc/blkid.tab*
ln -s /dev/null /etc/blkid.tab
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab

vi /etc/sysctl.conf and add these lines
vm.swappiness = 0
vm.dirty_background_ratio = 20
vm.dirty_ratio = 80
vm.latop_mode = 5


Update fstab:
---
vi /etc/fstab

tmpfs /tmp tmpfs noatime,nodiratime,size=16M,mode=1777 0 0
tmpfs /var/lock tmpfs noatime,nodiratime,size=4M,mode=1777 0 0
tmpfs /var/log tmpfs noatime,nodiratime,size=16M,mode=1777 0 0
tmpfs /var/run tmpfs noatime,nodiratime,size=4M,mode=1777 0 0


It seems on reboot /var/log is not mounted as tmpfs:
Filesystem Size Used Avail Use% Mounted on
rootfs 3.5G 1.1G 2.3G 31% /
/dev/root 3.5G 1.1G 2.3G 31% /
tmpfs 10M 112K 9.9M 2% /run
udev 10M 0 10M 0% /dev
shm 62M 0 62M 0% /dev/shm
tmpfs 16M 0 16M 0% /tmp
tmpfs 4.0M 0 4.0M 0% /var/lock
tmpfs 4.0M 20K 4.0M 1% /var/run

Instead I see in /var/log huge files that I like to limit and certainly it should not be written to USB stick!

[root@server log]# cd /var/log/
[root@server log]# ls -la
total 403588
drwxr-xr-x 2 root root 4096 Jul 8 14:22 .
drwxr-xr-x 13 root root 4096 Jul 8 14:04 ..
-rw-r----- 1 root log 583 Jul 8 14:11 auth.log
-rw-r--r-- 1 root root 0 Jul 8 14:11 boot
-rw-r----- 1 root log 295 Dec 31 1969 crond.log
-rw-r----- 1 root log 137554278 Jul 8 14:25 daemon.log
-rw-r--r-- 1 root root 12629 Dec 31 1969 dmesg.log
-rw-r----- 1 root log 137586834 Jul 8 14:25 errors.log
-rw-r----- 1 root log 137611445 Jul 8 14:25 everything.log
-rw-r----- 1 root log 24762 Jul 8 14:11 kernel.log
-rw-r----- 1 root log 23185 Jul 8 14:11 messages.log
-rw-r--r-- 1 root root 102 Jul 8 14:22 pacman.log
-rw-r----- 1 root log 82 Dec 31 1969 syslog.log
-rw-r----- 1 root log 112 Dec 31 1969 user.log

Any ideas appreciated, I like to see the usb stick stop blinking all the time...
cheers
dolphs
 
Posts: 5
Joined: Fri Jul 08, 2011 7:17 pm

Re: minimise disk IO on usb stick

Postby WarheadsSE » Fri Jul 08, 2011 7:32 pm

A #1

Please :

pacman -Syu
pacman -Sy udev-oxnas


This will fix the log files problem, immediately. We've patched udev to align to the state of our kernel on the oxnas, which is what was causing the huge log files.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: minimise disk IO on usb stick

Postby dolphs » Fri Jul 08, 2011 7:52 pm

cheers for your prompt response!
Well that seemed to work for the logs and /var/log issue already, thanks again!

"[root@server ~]# df -h

Filesystem Size Used Avail Use% Mounted on
rootfs 3.5G 756M 2.6G 23% /
/dev/root 3.5G 756M 2.6G 23% /
tmpfs 10M 112K 9.9M 2% /run
udev 10M 4.0K 10M 1% /dev
shm 62M 0 62M 0% /dev/shm
tmpfs 4.0M 0 4.0M 0% /tmp
tmpfs 4.0M 0 4.0M 0% /var/lock
tmpfs 4.0M 104K 3.9M 3% /var/log
tmpfs 4.0M 20K 4.0M 1% /var/run
dolphs
 
Posts: 5
Joined: Fri Jul 08, 2011 7:17 pm


Return to Community Supported

Who is online

Users browsing this forum: No registered users and 10 guests