Thursday, November 11, 2010

No threads attached?!? #*%&@

I found this cartoon (if I can call it one) on my desktop. I sketched it ( more like GIMPed it ) when I attended the Java threads session once upon a time, long time ago ( :D I love this line )

Back then, I had something in my mind I wanted to rant about. But then.... laziness won over me.

Unfortunately, today i don't remember what I wanted to write. So here is the cartoon I GIMPed.



Let me see, if I can write about threads when I start using them :D

Signing off now. Gotta write a test :(

Wednesday, November 10, 2010

Sort out all your problems!

"Hi!! meet Akshay"
"Hey!!!!!! I 'm Akshay too!" :) "what do you do?"
"U moron! I am you"
A dazed me, "guess I need to sleep now! good night" and turns to walk away.
"You have problems to sort out"
A half zombie-ish me, "Sort!!?!! Did you say sort??!!"
An angry Akshay, "You will have problems to sort all your life"
"Well... problems can take care of themselves, I m out now! " walking straight to bed next moment ... ... ... snore... ... ... snore ... ... ... snore ... ... ...


Me: What kind of losers try to sort problems all their lives?
Akshay : Loser! here are the kinds!! SortBenchMarkers

Me: Woah! they have no better life :O they sort problems all life??? I am sure they are not married! :P
Akshay: Sort problems is all their life... :-" (go type this on yahoo IM! thats my reaction)

Me: hmmmm....
Akshay: Why don't u try to figure out how they sort out problems.

Me: Well.. I have my own problems to sort!
Akshay: Yes! you do. Do the problems go a 108 or a 109

Me: Ouch! Hey that's a number system I have heard of!!
Akshay: <Completely devilish smile> He he!! let me remind you...

Me: Noooooo... I do remember. I do remember.
Akshay: So what are you going to do about it?

Me: You seem to have learnt everything, why don't you rattle off?
Akshay: Naaah! Not all. Everything is not interesting. I was looking at how much energy is spent is sorting some records.

Me: Dude! you really need to get a life. Spend energy on better things. Get a life :-|
Akshay: You can get a life for both of us. Now listen!

Me: Well... do I have a choice??
Akshay: Since I don't give you one, you don't have one :P

Akshay: The whole intent of this competition is to find out some awesome brains working on even better sorting algorithms.
Me: Yaaawn...

Akshay: Do you know how much energy you spent on yawning?
Me: Dude... leave me alone. Let me yawn in peace. I 'll keep quiet. You carry on :)

Akshay: Loser! with that energy of "keeping quiet" for few hours, I could sort a 108. Check it out!
Me: Whatever!

<Small pause>

Me: Hey, you got me curious. How do they calculate the energy spent on doing  some records manipulation? My lappy heats up like a toaster when i m on Photoshop.
Akshay: They use some specific circuitry and software to do it. What else? You think they sit with thermometers on the processor? <Sorry couldn't help! I had to crack it up>

Me: Hmmm.. Cool stuff!
Akshay: Actually hot! They measure how hot it gets. Elementary dude! The best part about the sorting, they get results in close to 20 seconds.


Me: Wow... wow.. wow... woah! Dude! Losers. I got a sort working in under that time for an assignment??! <triumphant smile> :)

Akshay: Loser! I know all about it, you were sorting some 16 byte strings. These guys work on 100 bytes record and a 109 records. Get the scale?

Me: <Whimper>

Me: Well go on then :(


Akshay: You know, most of time taken is for disk access. Even though they use solid state devices, disks kill the sort. They spent a whooping $6500 on the hardware. To get flash based disks.

Me: A 100% losers! $6500 on computer to do just a SORT? <dreamy eyes> I would have bought a 1DmIV and probably a big lens! :)


Akshay: Stop dreaming you Idiot! Listen to the config, they work with an intel xeon quad core processor machine, fitted with a 12 Gig RAM. <a small pause> Stop drooling. You ain't getting to install Photoshop on that!
Me: <gingerly> I was not thinking of that!
 

Akshay: With all this, they get to sort a 10Gig dataset in about 25kJoules.

Me: Well what if they used some low power machines? Like the NetBooks?


Akshay: Are you nuts? They would need a huge memory to store as much data as possible in memory. Atoms support a max of 4GB ( I need to verify ). Also lot of other constraints, the bus speeds, L2 Caches? Moreover, they would need quite a few SATA Ports for the solid state disks. Atom boards have just about 2.
There is another factor to consider, the power ratio between fixed power cost (@idling) to peak utilisation, is higher for Atoms. So the over all power performance takes a beating.

Akshay: Oh! well that said, they have also used an atom processor based machine to do the sorting! Its interesting to see the results


Me: So, couldn't they do any better on the timing? I still feel my assignment sort needs some credit! :D
Akshay: There are some problems there too. The OS used was Ubuntu 9.04. Linux has some problems related to the block I/O on solid state devices. This hits the performance again.

Me: You managed to get me interested in this stuff!! Let's do some Math and see how it performed?
Akshay: Dude, not now. I 'm sleepy!! You can check out this link, for details if you are interested.

Me: Well, OK! Unfair thought! You didn't allow me to sleep!

<Mumble> <Mumble>

Sudhix: DUDE!! Wake up! what are you talking to yourself? It's high time you go sleep!