Everything is broken.

Archive for the ‘Linux’ Category

ZFS in practice - verifying transparent compression -

Wednesday, November 5th, 2008

I had read about the transparent compression that zfs offers. I wanted to verify it so I did, and sent my results off.

As we all know no experiment is valid unless verifiable. I wanted be sure that the transparent compression was actually working so I set up a sample zfs volume and purposefully made some files that i knew would compress really well. I grabbed their sizes, transferred them to another machine without zfs, and compared the size. It works.
filesystems usually suck

1. Create the zfs filesystem
root@machine1:~# zfs create rpool/ztest
root@machine1:~# zfs set mountpoint=/ztest rpool/ztest

as soon as you do this /ztest shows up in the filesystem
root@machine1:~# ls /ztest/

2. enable compression and set it use gzip at level 6 (default)
root@machine1:/ztest# zfs set compression=gzip rpool/ztest

3. create some files you know will compress well
time for i in $(seq 1 3); do echo -n “file${i} “; echo $(seq 1 10000000) >> file${i} 2>&1; done

4. check the compression ratio
root@machine1:/ztest# zfs get compressratio rpool/ztest
NAME         PROPERTY       VALUE        SOURCE
rpool/ztest  compressratio  3.69x        -

5. verify the compression is working by transferring the file to a machine without such an awesome FS, and checking the filesize there
root@machine1:/ztest# du -sh file1
23M     file1
scp -rvp /ztest/file1 root@machine2:/root/file1

root@machine2]# du -sh file1
83M    file1

Conclusion: transparent compression is working, and working rather well on a file I made to be easily compressed.

You can use seq to generate sequences. Cool.

Sunday, July 27th, 2008

I should have known about this for a while, but I recently learned that I could use seq to generate a sequence of numbers. It has options for doing things like only outputting even numbers in the generated sequences, and more. Great for used in bash loops.

Put some debian in your mouth: 24 hours of Ubuntu vs Fedora

Friday, January 25th, 2008

I had forgotten how nice apt was in relation to yum. I mean yum is great, I could never build a package manager like rpm; let alone a utility as versatile and helpful as what yum is. I may have the capacity to build something that sucks right around the level of up2date 0.6.  I had managed to keep that machine running fedora for years, beginning with fedora core 2. I had never reinstalled, or performed fresh installs during that time, I just kept modifying the repos, running yum update, and fixing major issues as they came up. That machine has gone through a lot with me; but it has always been a dev machine. From my first install of Asterisk that I would later use to build Viatalk, to being my test machine while studying for the RHCE. I appreciate what the community has given me. Without open source software I wouldn’t be a system admin. I would never have found the interest. Maybe I would be a cop.
Ubuntu as a distro feels very by the people/ for the people. Things that I didn’t expect to work like playing mp3’s out of the box did with very little work on my end. I tried it for a day, and just went right back home. To fedora 9.

November 2008
M T W T F S S
« Oct    
 12
3456789
10111213141516
17181920212223
24252627282930

Other

Syndication