cvsps and the diet pill revolution

Posted on Thu 27 March 2008 in misc

One thing I've been doing at work is an experiment to convert the source code repository from CVS to something a little newer. This has been more than a little challenging.

The main problem is the tool cvsps is quite hungry for memory, especially on the rather large repository I'm trying to convert. It very rapidly allocates around 2.5 Gigabytes of heap memory (way more than physical RAM) to parse the revision history of CVS and build up all the change-sets. I set it off yesterday and shut down everything I could on the machine to give it as large a resident set size as I could. However parsing randomly allocated data in the heap is probably as close to a pathological use case for the virtual memory subsystem as you could get. As I logged of the machine last night I could see it doing about 1% real work while the rest of the time it was waiting on IO (I assume swap activity) and idling. Luckily by this morning it had got over that hump (although some of the git-repack calls are pretty memory hungry themselves). If I have to do the conversion again I'm going to invest some time into putting cvsps on a memory diet.