Welcome !

Welcome to speedtuxblog, a blog for linux geeks. System tweakings, security and so on. I hope you’ll found some usefull ideas, links and tutorials. This is also my first english blog ! it’s not my mother tongue (i’m french) so please be soft on my writing skills :-)

Converting Nrg files to Iso with dd command

On linux is really easy to burn or mount iso file, but sometime you’ll have to handle some specific format like .nrg

I really love playing with commandline. So how to to convert your .nrg into a iso :

dd if=image.nrg of=image.iso bs=2048 skip=150

It’s as simple as that. :-)

Reducing drive writes

On each new linux installation i apply these little tricks, reducing drive writes, put all the data that is not needed on tmpfs and last but not least reducing the swap utilization.

Linux records information about when files were created and last modified as well as when it was last accessed. so to bypass that and in order to reducing drive writes edit your /etc/fstab

sudo gedit /etc/fstab

and change defaults and/or defaults,relatime to noatime

UUID=d7d863b6-2d5f-4234-9ec0-dfd18e39a844 /               ext2    noatime,errors=remount-ro 0       1

///

Put not needed datas in tmpfs (a /tmp in your ram)

add at the end of your fstab these lines :

tmpfs /var/log tmpfs defaults 0 0
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0
tmpfs /var/log/apt tmpfs defaults 0 0

You will lose the data in these areas after a reboot but data in /tmp is not a big deal.

///

Prevent your system to start swapping (especially if you have a lot of ram)

sudo gedit  /etc/sysctl.conf

and add the following line to the end of the file :

vm.swappiness=0

///

Special tips for  ext3 filesystem :

Use data=writeback and noatime when mounting ext3 partitions in fstab

fstab example :

/dev/hda1 / ext3 defaults,data=writeback,noatime 0 1

and

sudo tune2fs -o journal_data_writeback /dev/hda1

data writeback : This is rumoured to be the highest-throughput option. It guarantees internal file system integrity, however it can allow old data to appear in files after a crash and journal recovery.

///

now you can reboot you’ll have a faster system

Normalize your mp3′s

I’m sure you have noticed that mp3 files from differents cd sources are not on the same volumes. Sometimes you could be notice a significant volume difference between two songs.

This is the best way to resolve this problem :

The perfect program for doing this is called mp3gain

MP3Gain analyzes and adjusts mp3 files so that they have the same volume but not like other as many normalizers do, it does some statistical analysis to determine how loud the file actually sounds to the human ear. And the best are coming : all these changes are completly lossless ! No quality lost !

how to install it (on ubuntu) :

sudo apt-get install mp3gain

on terminal browse to your mp3s folder :

mp3gain -r *.mp3

that’s all ! A simple but very usefull command line.

I-Ram : Long live the King !

How fast is your disk ? There are several kinds of hard dives on market today (ide, sata and now ssd) but the most unknown’s one is the gigabyte i-ram (you should go on ebay to find one, it’s the only way to grab this marvelous hard drive).i-RAM acts like a regular SATA hard drive but utilizing conventional DDR memory modules.

gigabyte I-ram

gigabyte I-ram

For measuring the speed of your disk the two most important things are sequential access (when you’re reading or writing disk blocks) and random access (where you access your disk at random. In that case the disk head moves rapidly from one place to another). Random access is the most important one, in case of booting time process for example, you have to load a bunch of small files, so your disk head has to access them as fast as possible.

On linux you could find a little tool called hdparm to measure sequential disk performance.

Measuring your first sata disk like this : sudo hdparm -t /dev/sda1

in my case (two hard drives in raid0) :sudo hdparm -t /dev/md0

Timing buffered disk reads:  342 MB in  3.00 seconds = 113.92 MB/sec

///

For measuring random access time there are no native tool, you have to compile this one (called seeker)

wget http://www.linuxinsight.com/files/seeker.c

gcc -O2 seeker.c -o seeker

sudo ./seeker /dev/md0

Results: 119 seeks/second, 8.34 ms random access time :-( (

///

Now comes the insane benchmark of the King :

sudo hdparm -t /dev/sda1
/dev/sda1:
Timing buffered disk reads: 346 MB in 3.01 seconds = 114.87 MB/sec

sudo seeker /dev/sda1
Benchmarking /dev/sda1 [4094MB], wait 30 seconds…………………………
Results: 13266 seeks/second, 0.08 ms random access time

///

And if you don’t like numbers, and measuring tools, watch this relevant video (windows booting time on iram) :

for linux example, on ubuntu 8.04 i have a 14 seconds result on ext2 filesystem with bootchart.

Follow

Get every new post delivered to your Inbox.