Software and hardware annotations 2011 July

This document contains only my personal opinions and calls of judgement, and where any comment is made as to the quality of anybody's work, the comment is an opinion, in my judgement.

[file this blog page at: digg del.icio.us Technorati]

110730 Sat Better "universal" power supply tips

Some time ago I bought a third party laptop PSU branded Targus, which is a usually reliable supplier.

The main defect of this PSU is that the interchangeable tip broke off very soon, and for understandable reasons, the main being that electrical contact between main cable and tip is via a 2×pin plug in the main cable and a corresponding socket in the tip.

  • This design is very prone to breaking the tips, because there is little but a plastic indentation that prevents the tip from rotating, and it will rotate during insertion and removal. This happened in my case very quickly, and one of the pins broke off.
  • I have now found a Xenta branded PSU which has a remarkably better design:
  • This is a very good design because it is very convenient and robust and indifferent to rotation. The adaptor tips are a bit bigger, but this is rarely important.

    110730 Sat Ubuntu 'udev' automatic DM wrapper

    In addition or among the several annoyances derived from Debian and its excessively automagic attitude, I have just discovered that Ubuntu, at least in version 10, automagically wraps any dynamically discovered block devices (such as USB disks) with DM.

    This is very inconvenient because once so wrapped the block devices are therefore busy and cannot be reconfigured, for example repartitioned, conveniently.

    This is done by a udev script (currently /lib/udev/rules.d/55-dm.rules), and that could be edited or perhaps overridden to avoid this, but a simpler workaround if coarser workaround when one does need to reconfigure a just inserted block device is to run:

    dmsetup remove_all

    This will remove all the active DM wrappings, which usually are only those of the newly inserted device. If more precision is desired, one has to issue multiple commands like:

    dmsetup remove /dev/dm/dm0
    110728 Thu Review of Samsung WB2000 camera

    The Samsung WB2000 camera (also known as TL350 in the USA) has these notable strengths:

    Overall a very highly satisfying camera, with some more minor positive points, such as:

    The negative points are few and relatively less important:

    This camera replaces the previously mentioned Olympus SP-350 (because I had dropped it and cracked its LCD display). I like the new camera rather more than the previous one, which was pretty good, and the main differences are:

    To some extent it is remarkable that there are relatively small differences between the 5-year old SP-350 and the WB2000, but the latter is definitely an improvement especially with the new technology for the display and the faster processor.

    In summary because of the better image sensors (the lower pixel count helps a lot), the better display and the higher processing speed the WB2000 seems to me significantly better than most similarly priced cameras, and the price is also towards the lower end of the midrange camera segment.

    110717 Sun Facebook has MySQL scalability problems

    It was interesting to read that Facebook have been having large scalability problems with MySQL:

    According to database pioneer Michael Stonebraker, Facebook is operating a huge, complex MySQL implementation equivalent to “a fate worse than death,” and the only way out is “bite the bullet and rewrite everything.”

    Not that it’s necessarily Facebook’s fault, though. Stonebraker says the social network’s predicament is all too common among web startups that start small and grow to epic proportions.

    Part of the issue is that indeed successful companies grow very fast and getting something to work at all takes precedence over getting it to work well. But part of it is technical, as the main problem unsurprisingly is not so much the size of the databases, but the extremely high degrees of concurrency required:

    The is that the site had 1,800 servers dedicated to MySQL and 805 servers dedicated to memcached, although multiple MySQL shards and memcached instances can run on a single server. Facebook even maintains a MySQL at Facebook page dedicated to updating readers on the progress of its extensive work to make the database scale along with the site.

    The reason why this is a technical problem is the nature of the application: on a site like Facebook it is difficult to exploit locality of data use, as just about any user could in principle connect to any other user, and network effects almost certainly involve power law driven peaks in resource huge, and un predictable ones.

    Relational databases have been designed usually for fairly stable and predictable factual databases typically for registration of transactions and entities, rather than for social networking and online discussions.

    In particular MySQL was designed as a simple, even simplistic DBMS for small scale applications, more like the single user Akonadi databases than massively multiuser online social networking sites.

    110701 Fri 2GiB is too little memory

    I have upgraded my new laptop some time ago to 4GiB selling out again again to the ever more appalling memory waste of most software, but also because I switched to 64 bit GNU/Linux, which does seem to consume more memory as expected.

    I have recently given 2GiB of it to someone else for their laptop as their memory was defective, so I am temporarily back to just 2GiB.

    It is way too little. Sometimes my laptop just freezes during paging, in part because of the suboptimal Linux VM and swapping logic. This is mostly because of web browsing, even if having both KDE and GNOME running also impacts, as well as having six virtual screens.

    But the main issue is tabs during web browsing, of which I tend to have many because I sort of use them as very active bookmarks. Unfortunately many web browsers implement tabs in a way that requires lots of memory, for example caching previous pages to make the backwards and forward buttons quick. Also web pages tend to be overcomplicated with many gratuitous images and dynamic layouts.

    However 4GiB seems still quite monstrous to me for what is after all mostly text work: terminal and EMACS windows, email, and mostly text web pages. Even in 64 bit mode it seems a bit excessive. I can imagine more memory for something like more detailed and appealing games instead, and that has been happening too.