ssd's and ubuntu

So I got fed up with waiting for my new computer to boot or java to find the hundreds of files it needs, I decided to blow my spoils from a recent conference victory on a SSD hard disk for my desktop machine.

First surprise - it came in a flat envelope - thought it was a mistake at first, and they'd sent me an OEM cd, but sure enough it was an Intel 80Gb (SSDSA2MH080G2C1 to be precise...) . These things are really small, packaged in not much and must be quite robust.

Second surprise - well not really surprise, the speed boost is pretty noticeable. Overclocking takes second place to getting one of these on your development machine - top video is with my old HDD (320Gb WD Caviar drive), bottom with the Intel SSD.

So running ubuntu, there are two things I discovered people talked about - erase block alignment and trim support. Because I'll forget what I did this time, I'll note it in this blog, however I suspect that by the time anyone uses this, there will be a better guide available.

Erase block alignment

As explained here, when a SSD deletes data, but nuking entire erase blocks. On my intel disk disc drive the erase block size is 128K (128 * 2^10 bytes, different drives, such as the OCZ use different e/block sizes), so we want the sectors of the drive to align to this boundary. I used the instructions here to use the live Ubuntu CD and fdisk to ensure this was the case.
Then I reinstalled ubuntu and booted her up.

Trim support

Trim is an operating system function that tells a drive when pages are no longer in use, and can be handed back to the SSD's page-allocation system. But the default version of Ubuntu (currently lucid/10.04) uses kernel version 2.6.32, so there's no trim support. The instructions here give a painless way to upgrade the kernel to 2.6.34, once ubuntu is installed.




weighted straight skeleton source release

The straight skeleton shrinks in the boundary of a polygon, whilst tracing out the corners to create a roof-like structure. Thus is quite useful for building things like roofs or offset surfaces. I never did find an impelmentation that wasn't CGAL's, so here's a floating point implementation.


The weighted skeleton allows the edges to move at different speeds. You could even assign negative weights to edges.

Instructions: (java webstart, binary code, run at your own risk).
  • Left drag the little orange squares at the corners of the cross
  • Right drag to move the view
  • To change the weights drag the big orange circles
  • Control-click to add corners
  • Shift-click to remove corners
  • There are known bugs (for example the polygons in the UI overlap, there will be cases where it doesn't tessellate).
  • Use alt-while-dragging to snap to grid
Google code project (java) is here.

Here's an example of how to skeleton a simple triangle. Points are defined counter clockwise. If you only want the 2d projection, discard the final (z) co-ordinate of the output-faces.

        c1 = new Corner ( 0,0),
        c2 = new Corner (100,-100 ),
        c3 = new Corner (100,0 );
       Machine directionMachine = new Machine ();
       loop1.append(new Edge ( c1,c2 ) );
       loop1.append(new Edge ( c2, c3 ) );
       loop1.append(new Edge ( c3, c1 ) );
       for (Edge e : loop1)
        e.machine = directionMachine;
       Skeleton skel = new Skeleton (out, true);
       for ( Face face : skel.output.faces.values() )
           for (Loop  lp3 : face.points)
            for (Point3d pt : lp3)


equipment funding in academia

So coming from industry to academia, the 50% pay cut was announced up front - fair enough - I can get up at any time after 11am, and only have to be in one place for an hour every week. But I didn't realise how hard it would be to get equipment and software that was trivially available in the commercial world. If you can make a case to your manager that a 30" monitor will save you an hour a week, it is more effort for them to reject the request (a 30 minute meeting costs more than the requested hardware), than to grant it - hence hardware and software are a non-issue.

But it turns out I had made an assumption that inviting someone to study graphics at a university meant that there would be equipment available to do graphics research of a globally publishable quality. I'm not talking about Cray supercomputers, I'm talking a decent current gaming pc (£1,500) to be able to do real-time graphics. Turns out that Glasgow's department of computer science starts PhD students off with really poor hardware:

and upgrade them if they complain enough - there's no money available for upgrades (all the budgets are maxed out in the current environment), so they shuffle graphics card and memory around the department to whoever needs them more. This was the specs of the machine that I was given when I started at the end of 2008, they don't come close to what I'd describe as "industry standard software development platform", closer to what you need to run office software:-

PhD Starting October 08 got this machine

So that's no dedicated graphics card, and 19" monitor - most people in the vision group (who spend their days with 15 windows open, examining many images), still use this gear. Frankly I doubt this equipment cost £500 at that time, my similar machine (with a £200 graphics card, but without the £100 monitor) cost £600 a year earlier. And okay there are servers available - but mostly these are funded by individual research grants, rather than being open for all PhD students - and most importantly servers make it difficult to do the kind of real-time processing that graphics demands.

After complaining (and as way of apology for loosing my computer) I got a computer equivalent to that £600 machine - but most almost all students don't have industry experience, don't know what a development environment looks like, and don't complain loudly enough.

For example the last graphics paper I wrote had a nice render and an accompanying video. Either setting up the rendering of large scenes or editing video require a decent local computer, especially to compete in computer graphics at an international level.


Considering there's so little money required for decent hardware (£3000 over 3 years is probably sufficient, even for heavy graphics), compared to the cost of salaries (£40,000 over three years) it leaves a feeling that the department doesn't value PhD time. However when you start to look at where the hardware funding comes from, (for example Sicsa pays Glasgow £2000 a year for my hardware), it looks like it's being lost in the University's & Department's bureaucracy black-hole.

dcs workstation
my dept pc - we're not talking state of the art here

I've ended up building my own gear for use at home - bit of a sad outcome, but guess I don't have to put Glasgow on any of the papers I write now ;)