Josef “Jeff” Sipek

August 23, 2007

Smile!

Filed under: programming programming/kernel random humor filesystems — JeffPC @ 16:29

Last night, I forget who, challenged me to make a smilie with disk io and seekwatcher. Well, I couldn't let such challenge just pass me by (click to enlarge):

Smile!

All that I used was: blktrace, seekwatcher, python (to do the math - sin, cos, etc.), and dd (to do the disk io). I am already planning bigger and better things :)

August 23, 2007

We Build This City

Filed under: music — JeffPC @ 14:44

Wow. Just wow. Today, I was listening to the radio on my way to work (CBS FM
if you must know), and We Build This City came on. Fun song if you ask me.
Near maybe 2/3 of the song, there are these few seconds where there is a
"news radio station"-type segment. Well, CBS decided to have some fun, and
they had the voice of the dude doing the show at the time properly distorted
to make it sound like the original. He of course plugged CBS, but it was
awesome :)

August 22, 2007

XFS, blktrace, seekwatcher

Filed under: programming programming/kernel filesystems — JeffPC @ 23:50

Today I was playing with blktrace, and graphing the results with seekwatcher. At one point, I ran acp (which is a lot like tar, but tries to be smarter) on a directory stored on an XFS volume, but I forgot that months ago, I created a sparse file 101PB (that's peta) in size. Well, acp was happily reading all the sparse regions. I killed it, and decided to remove the gigantic file which was totally useless. About 30 seconds into the removal, I realized it would have been great to have a trace of that. Well, I started blktrace and about 12 minutes later the rm process finished.

I graphed it and here's the result (click for larger version):

XFS removing a large sparse file

At first I was very confused why things looked the way they did, but eventually it dawned on me (after some discussion with Dave Chinner - XFS dude) that it's all journal log traffic. I quickly ran xfs_info on the filesystem:


meta-data=/dev/sdb1 isize=256 agcount=16, agsize=1120031 blks
= sectsz=512 attr=1
data = bsize=4096 blocks=17920496, imaxpct=25
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
log =internal bsize=4096 blocks=8750, version=1
= sectsz=512 sunit=0 blks
realtime =none extsz=65536 blocks=0, rtextents=0

And things just made sense. I calculated the size of the log (see bolded numbers) to be (4096*8750) bytes, or 34.17 MB (base 2) or 35.84 MB (base 10). If you look at the graph, you'll see that the disk offsets accessed were 35001 to 35035 MB or about 35MB! XFS puts the log near the middle of the disk to minimize seeks as much as possible, so as you may have guessed, my disk is about 70GB in size (it's a U160 73GB SCSI disk).

August 19, 2007

Wikipedia

Filed under: random humor — JeffPC @ 18:01

Today I decided to check something on wikipedia, and I stumbled on the page about time. I was quickly scrolling through, when I decided to read a random paragraph in the Definitions and standards section:


The definition of time is extremely important in science and for our everyday life. All known properties of time follow directly from this definition. For example, this definition of time coupled with current definition of space makes our space and time to be Minkowski space-time and makes special relativity theory absolutely correct (true) by definition.

It took me a while to realize, but the last sentence is funny..."special relativity is absolutely correct."

Powered by a pile of c