An interesting thing happened on the way to the bit bucket... Tuesday, 26 January 2010  
I wrote the other day about how I was happy with VirtualBox as a replacement for VMware. I still am - it still feels sluggish, and I still havent benchmarked it. (I would expect cpu benchmarks to run at near native speed, and I/O or graphics to suffer, but I am not sure yet what I want to measure).

I keep on switching to VirtualBox only to find my one and only VM has died. Shame. I sob for the VM that died, and restart it.

I am wondering if hibernate causes it some grief and when the host hibernates, it leaves it in a state.

On the other hand...

I was using my machine, and noticed a horrendous paging slowdown. So bad it took me ages to see what was going on, and by then, it was game over. Firefox had died as had VirtualBox guest.

"dmesg" showed the out of memory killer had struck.

I have a 2GB RAM machine (no swap), with typically 400MB given to firefox, and 800+MB to VirtualBox and the rest for X, window manager and the other very heavyweight apps that make up Ubuntu and KDE.

But why? I dont know. I do know an XP guest, left unattended will drum into action, presumably as the windows updater fires at 24h intervals and probably caused the guest to suck up RAM. I think VirtualBox creates unreserved memory - on a good day, the RAM is unallocated, until the point it needs it. A common idiom for Java JVMs. However this is a very antisocial thing to do: if memory is constricted, then the kernel OOM killer can strike just when you dont want or expect it.

Maybe theres an option to stop this from happening or maybe I could just write a guest RAM hog app to force allocation up front. I dont mind firefox dying - its not a showstopper to restart it, but crashing the Windows XP guest *is*. Its very time consuming to restart it.

I've added 400MB swap to slow down this effect, and I do need a laptop which can take more than 2GB of RAM. I have my eyes set on an 8GB RAM baby (good price, but out of date processor - Dell Vostro 1720). No one is doing the 1920x1200 screens I want. C'est la vie.

I need to dive in VirtualBox internals a little more and/or update my version - the Ubuntu apt-get release is out of date, and maybe I should just download or compile my own - but I know that can be painful.

Maybe I need to track RAM better or run dtrace or ...

Posted at 21:05:34 by Paul Fox | Permalink
  VMWare/VirtualBox, 1920x1200 laptop screens, ... Saturday, 23 January 2010  
I may have finally caught up with my Xmas backlog - spent Xmas finishing up the CRiSP v10 release. Of course as soon as I release it, people find bugs, so, c'est la vie.

I had to go away for a week, got back to find my broadband wasnt working - waited three days for engineer to come out.

I recently switched to using VirtualBox on my main 17 inch laptop (1920x1200 Inspiron 9400). I had upgraded the Ubuntu distro and got fed up having to patch the vmware 1.0.8 source drivers to make it work and compile. VirtualBox has matured, and seems really good, now I am using it daily. I havent done any benchmarks - I *think* it feels more sluggish but I am not sure if this is the video rendering or the raw cpu. Its not enough to bother me.

What *is* very curious is that VMWare 1.0.x was hugely disk intensive. I dont know why - its an old release of vmware, and there are newer releases (VMWare server 2.x, VMWare workstation, etc). What vmware 1.x seemed to do was discard the page tables (an optimisation?) If the VM isnt used in a while (or, maybe after resuming from RAM suspend for the host), then theres a huge amount of paging to bring the VM back into memory - taking ages. My 2GB RAM laptop (maxed out), with about 400MB for firefox, hundreds of megabytes for X server + KDE desktop, and my fcterm's, and 700MB RAM allotment for XP guest, is just too much.

So, I am running VirtualBox - and the disk light hardly ever comes on - whether I am booting windows, or returning after a resume, or after doing lots of stuff outside the guest. I *think* a problem with VMware was mmapp()ing the RAM memory - good in case of crashes (vmware or host crashes), as you have an intact VM, but I think it stressed the kernel to ensure the dirty pages were written to disk. I havent checked if VirtualBox is doing this - but disk activity is on a par with what I am doing, rather than VirtualBox trying to be comfy on the sofa.

This is encouraging - I thought vmware 1.x was totally fine for me, but now I have learnt something.


Which brings me on to the 1920x1200 screens. Apple's new iMacs with the 2560x1440 27 inch screen are fabulous. As a developer, you cannot have enough pixels (despite my eyesight not being what it was). More pixels is better than a faster CPU or huge amounts of RAM.

My last laptop (Inspiron 9400) is maxed out - Dual Core (32-bit cpu) 1.6GHz, 2GB RAM, 500GB hard drive, 1920x1200. Some of DELLs machines are good value for money and the WUXGA screens are brilliant.

Now that we are being flooded with Intel i3/i5/i7's, everything new is 1080p screen size. Most laptops are fitted with pathetic screen resolutions (1600x900, I mean, come on! What drugs are people on !). 1600x900 or the other sizes are brilliant if you have a less than 12 inch screen, but on a 17 or larger screen?

Browsing google suggests we wont see 1920x1200 screens any more - the bang for buck in the market is home entertainment, HD video, etc and 1080p screens are "it". None of DELLs newest laptops have WUXGA support - only the older Vostro/Inspirons maxing out on dual core duos.

(I use DELL as a metric - there are so many competitors and keeping up with everything is time consuming, but, with DELL, you can, if you study there site and outlet page, work out where they are overpricing; their add-ons are extortionate, e.g. today, 60 GBP to go from a 320GB drive to a 500GB drive, when drives cost that on their own).

I am not meaning to be a DELL fanboy, but they are consistent in their delivery - in the area I care about, until now.

Anyway, so todays ideal machine is: 1920x1200, quad-core, 8GB RAM, 500+GB disk. Screen size is most important, and I waver between whether the cpu or the RAM is more important. To get that screen size from DELL means a trade off (DELL Vostro 1720) - vastly overpriced dual core duo's, but very reasonable 8GB price. Remember, today (Jan 2010) Core i3/i5/i7's are coming out very price competitive. Prices in the range 100GBP to 200GBP). So, for the Vostro above, I can upgrade from a 2.26GHz Core Duo P7570 (1066MHz bus, 3MB cache), to T9550 (2.66GHz, 1066MHz bus, 6MB cache), for 160 GBP. What is that - 30% performance enhancement, if I was lucky, for the same price as a quad core chip? Its even worse if you pick other starting points on the website, hitting 250+GBP for a tiny performance increase.

CPU speeds have flattened out, and its good *NOT* to be on the cutting edge. If you are, you have nowhere else to go. My 1.6GHz 32-bit chip will see a near doubling of performance when I upgrade, and by picking last years model, the cost-benefit is in my favor. (The new DELL Studio range are attactively priced, but that darn screen is limited to 1920x1080, and I miss my pixels!)

Posted at 14:04:33 by Paul Fox | Permalink
  www::mechanize and Saturday, 02 January 2010  
Strange - I spent a lot of time trying to get the form filling to work, but something strange is going on, or WWW::Mechanize is buggy. (I tried writing a CRiSP macro to do what I wanted - that nearly worked - fewer dependencies).

The issue is submitting a form. When I ran the form submits from 'elinks' I could see a "302" being returned on the form submission, yet, using WWW::Mechanize, I got a "200" response. Not sure I understand what WWW::Mechanize is doing on a form submission, and some strange cookie behavior.

Anyhow, I got it to work by rethinking the problem (using wget on appropriately formed URLs to the site; sort of "not ideal", but actually "pretty good", because now I can get all the channels - too many in fact, but thats better than coding up a form filler to pick the TV channels I am interested in).

You can see the results by clicking here:

This is for my personal benefit and no guarantee this will be updated at all frequently, but I can use my iPod or iPhone to see whats on in one hit.

BTW am stilling griping about the ipod touch. My ipod touch freezes and needs a hard reboot maybe twice a day depending on what films I watch. I am certain its something in the film decoders which can crash the ipod or cause severe memory leaks. Even tilting the device stops, and I get the circulating "busy" icon (if I am lucky). Wish they would put better software fixes out.

Posted at 11:56:13 by Paul Fox | Permalink + vmware / virtualbox Friday, 01 January 2010  
The website is a very nice site for viewing upcoming tv listings for VirginMedia, Sky, etc, for the UK.

The amount of info is quite staggering, and its useful to have custom views of their data.

I put together a script which can show upcoming new seasons of programs, and film summaries (along with ratings), sorted by rating.

I am just playing with WWW::Mechanize, in a perl script, to get the cookies set up so that the Sky Movies show up. (By default, the tv guide shows a reasonable selection of channels, but you need to customize the views to show what region and vendor you are using; of course, this uses cookies, so am experimenting with how to get the settings correct for the tv view).

Hopefully wont take too long. If anyone is interested in the script, I will post it up on my website.

I upgraded my laptop to Ubuntu 9.10; of course, vmware stopped working. I started building a new kernel and applying patches to vmware, but thought I would just switch to virtualbox. After a few hiccups, my Windows XP VMware image is running fine - screen and networking. (I had to install an Intel driver before the system would see it had a network). Its running nicely. The resizable video display is nice.

Posted at 18:13:34 by Paul Fox | Permalink