ssd optimizations 
* do partition alignment

Check if aligned at http://www.techpowerup.com/articles/other/157

Theodore Ts'o's blog post is somewhat misleading, as even that manufacturer's MLC SSDs have an erase block size of 512KiB (PDF), like OCZ's drives - not 128KiB. You're better off running fdisk -H 32 -S 32 /dev/sda, which will align partitions to 512KiB, and mke2fs -b 4096 -E stride=128,stripe-width=128 -t ext4 (128 * 4096B = 512KiB).

for partitioning see http://www.ocztechnologyforum.com/forum ... sing-fdisk

But without ATA TRIM your drive writes will decrease (depending on write usage)

The only solution seams to secure erase the whole drive and do a reinstall

* add "elevator=noop" to /boot/grub/menu.lst


Some tips i found but think this came from a myth:

* use a tempdir for logs

/etc/fstab
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0

/etc/rc.local
for dir in apparmor apt ConsoleKit cups dist-upgrade fsck installer news samba unattended-upgrades; do
mkdir -p /var/log/$dir
done

* Set Firefox Cache to RAM
in about:config set browser.cache.disk.enable to false

* change the file system mount options on SSDs to "noatime"

[ view entry ] ( 2171 views )   |  print article
secure rsync to only one directory 
I want to rsync to a remote host to a given directory.

local-host:
ssh-keygen -t rsa
keyfilename: ~/.ssh/rsync
ssh-copy-id -i .ssh/rsync rsyncuser@remote-host

rsync files with ssh:
rsync -vaHxr --delete \
-e "ssh -i ~/.ssh/rsync -c arcfour -o Compression=no -x" \
LOCALDIR rsyncuser@remote-host:

remote-host

/home/rsyncuser/.ssh/authorized_keys:
from="192.168.0.2,",command="/home/rsyncuser/validate-rsync.sh",
no-pty,no-agent-forwarding,no-port-forwarding
ssh-dss 012345678...
limit access with from (optional).
On sucessfully ssh login command is executed.
Read More...

[ view entry ] ( 2486 views )   |  print article
ffmpeg http Transfer-Encoding: chunked 
Today i a made a patch for ffmpeg to be able to fetch a png file from a cgi script

ffmpeg -f image2 -vcodec png -i 'http://server/cgi-bin/graph.cgi'

This didn't work because ffmpeg/libavformat/http could't handle "Transfer-Encoding: chunked"

0001-http-Transfer-Encoding-chunked.patch

[ view entry ] ( 2420 views )   |  print article
How to recompile / rebuild a debian package 
$ sudo apt-get install build-essential fakeroot dpkg-dev
$ mkdir build
$ cd build
$ sudo apt-get source foo
$ sudo apt-get build-dep foo
$ cd foo
$ dpkg-buildpackage -rfakeroot -b -us -uc -nc

-nc does not clean, usefull if you change something and rebuild

http://www.cyberciti.biz/faq/rebuilding ... y-package/

[ view entry ] ( 1259 views )   |  print article
run webalizer over existing (also compressed) logs 
webalizer.conf:
LogFile /var/log/apache2/access.log.1
OutputDir /var/www/webalizer
Incremental yes
To have the right sorting order (oldest logs first) i use ls -tr.
for i in $(ls -tr access.log*); do \
webalizer -c /etc/webalizer/webalizer.conf $i; \
done


[ view entry ] ( 1907 views )   |  print article

<<First <Back | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Next> Last>>