20121214

New Computer

I recently upgraded my main system from a Phenom II to an Ivy Bridge (Xeon E3-1270), and this may be stating the obvious, but dang is it faster...
I have a little benchmark program I wrote to test a simple C-library of data structures, that normally took 10 seconds on my old machine, that now completes in just under 4. If I launch eight of them at once (two per real core), the hyper-threading lets them complete in just under 6 seconds a piece. Wow!
With my spare cycles, I normally run GIMPS work units, which is a distributed prime number search that consists of heavy floating point operations. The new machine processes work units about 6 times faster than the old one. I'm assuming the new AVX instructions are mostly responsible.
Which brings me to an awkward problem... I normally run 4-threads of GIMPS at a niceness of 19, which usually translates into very little CPU usage, and I just let it run without typically noticing any performance hit. But with hyper-threaded cores, the Linux scheduler notices that I've got spare CPU's, and happily schedules them with GIMPS tasks. So what ends up happening, is I get my interactive workload on a core, and a GIMPS thread on it's hyper-peer, and they split CPU roughly 50% (modulo the hyper-threading boost). That kind of hurts, but I also hate to turn off hyper-threading since it was a 30% throughput boost when I do have real multi-threaded workloads.
At the moment I'm just living with it, and turning off GIMPS if I run into a situation where I care, but that kind of sucks. I tried playing with cgroups, but from all I can tell, they're not really designed for this. You can use them to limit things to a percentage of the CPU when you're under load, but when there are spare cores they optimize for throughput, and schedule things anyway.
After digging through the Internet, I finally found a utility called cpulimit that is almost what I want. It'll let me limit the total CPU of a process tree to X% of a core, so I can limit GIMPS to 3 cores, and leave one completely spare, but I still have to manually pay adjust to it if I want to give it my whole CPU while I'm gone.
What I really want, is for it to check my load average, and automatically scale up/down the limit it's applying to GIMPS based on how busy my system is. After pulling the source for it, I think I know how to make it do that, so sometime when I get really motivated I'm going to give it a try.
Among the other fun things I've learned while setting up this machine is what happens when you don't have your static /dev setup right (the kernel can't launch init...), when you don't have a /run folder (your hostname never sets, and you can't successfully halt or reboot among other things), and Gentoo live cd's haven't setup the net.eth0 symlink by default since at least January. Oh, and don't dd your disk while you have it mounted... It doesn't end well.
I have also now become well-acquainted with NewEgg's return policies, having sent them back a bad motherboard, and a set of four 8-GB RAM chips (which I mistakenly ordered despite the fact that registered memory wasn't compatible with my motherboard). Props to NewEgg for painlessly taking it all back.  (Update: NewEgg has since refused to accept my motherboard back... :-(  )

I'd like to think this experience has made me wiser, but if nothing else, at least I now have a faster computer. :-D

20120807

Joining the morass

This blog has officially not been updated for over a year... Such is life.

20110612

Ubuntu 11.04 "Window Grippers"

In case anyone else was as annoyed by the Ubuntu 11.04 "Window Grippers" (aka the obnoxiously large resize handles), instructions to disable them can be found here.

Saving the world, from one obnoxious UI change at a time...

20110524

grep 2.8

So I was sitting around today, lamenting the fact that grep isn't multithreaded, and decided to actually do something about it.  Since all of the appropriate Google searches just seem to list other people lamenting the same fact, I started messing around with things.  Turns out, I can get a 20-50% speedup just by doing this:

find $files -type f -print0 | xargs -0 -n10 -P8 grep -H $ARGS "$pattern"

(Word to the Wise: There is also a similar, but very wrong way to do it...)

find $files -print0 | xargs -0 -n10 -P8 grep -H -r "$pattern"

 So after tuning the threading numbers there, and feeling pretty good about myself, I decided to look up the mainline GNU Grep source, and see if there wasn't something I could do to help.  So I pull up the current source, and upgrade my box to use grep 2.8 instead of Gentoo's stable 2.5.4, and Holy Snapdragon!  (Yes, I actually said that...)  I got a 10x-60x speedup on the workloads I was testing.  Yes, you read that right.  My tests that were taking 48-80 seconds, were now finishing in 1-2 seconds.  I dunno what kinda magic they threw into grep 2.8 but good work guys.  Still no multithreading, but with the new version, I have real trouble just finding a workload that needs it.

So, my Gentoo countrymen, if ever there were a time to use unstable, this is it!

20110507

Skype and Gentoo amd64

I have a weird problem where my skype video intermittently (read mostly) doesn't work.

I found a solution here:
http://papers.ch/?p=94

Apparently it doesn't figure out it needs to load the 32-bit versions of v4l ...

20110505

Bash-ism

Fun fact of the day: "echo *" and "echo */" do not do the same thing... (with the obvious distinction).

20110419

Standards of Proof

Standards of Proof in the Internet Age

The Dark Ages
1960?-1970?: Published Work

Birth of the Internet
1970-1979: Electronic Article by a University Professor
ca 1980: a posting on Usenet

The Web
late 1980s - early 1990s: some grad student's personal website
ca 1992: AOL encyclopedia article
ca 1996: a page on GeoCities
late 1990s: corporate sponsored web pages

Social Networking
early 2000s: some guys Blog
ca 2006: a video on YouTube
2007: a Wikipedia article
2009: some celebrity's Twitter feed
2010: a poll of your Facebook followers

Source: My Personal Thoughts, April 2011.
(Some of the above mentioned sources were consulted for historical accuracy... the rest was fabricated.)