Software and hardware annotations 2009 June

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]

090621 Sun Much slower decrease of laptop battery capacity

So I have got some time ago a 9 cell battery for my laptop and started using it more carefully than the previous 6 cell one to avoid it losing capacity faster than its natural rate. How it been so far? I bought it in mid-December 2008, that is exactly 6 months ago, and at after 2 months I started doing occasional logging of its maximum capacity and the dates and numbers are:

090226:    Last full capacity : 7800 mAh
090228:    Last full capacity : 7800 mAh
090304:    Last full capacity : 7800 mAh
090311:    Last full capacity : 7800 mAh
090322:    Last full capacity : 7502 mAh, 96.18% of design capacity
090324:    Last full capacity : 7502 mAh, 96.18% of design capacity
090326:    Last full capacity : 7502 mAh, 96.18% of design capacity
090331:    Last full capacity : 7502 mAh, 96.18% of design capacity
090407:    Last full capacity : 7502 mAh, 96.18% of design capacity
090409:    Last full capacity : 7502 mAh, 96.18% of design capacity
090415:    Last full capacity : 7502 mAh, 96.18% of design capacity
090416:    Last full capacity : 7502 mAh, 96.18% of design capacity
090417:    Last full capacity : 7502 mAh, 96.18% of design capacity
090418:    Last full capacity : 7502 mAh, 96.18% of design capacity
090419:    Last full capacity : 7502 mAh, 96.18% of design capacity
090421:    Last full capacity : 7502 mAh, 96.18% of design capacity
090423:    Last full capacity : 7502 mAh, 96.18% of design capacity
090428:    Last full capacity : 7502 mAh, 96.18% of design capacity
090507:    Last full capacity : 7502 mAh, 96.18% of design capacity
090512:    Last full capacity : 7502 mAh, 96.18% of design capacity
090521:    Last full capacity : 7502 mAh, 96.18% of design capacity
090527:    Last full capacity : 7502 mAh, 96.18% of design capacity
090604:    Last full capacity : 7300 mAh, 93.59% of design capacity
090611:    Last full capacity : 7300 mAh, 93.59% of design capacity
090615:    Last full capacity : 7300 mAh, 93.59% of design capacity
090617:    Last full capacity : 7300 mAh, 93.59% of design capacity
090618:    Last full capacity : 7300 mAh, 93.59% of design capacity
090619:    Last full capacity : 7300 mAh, 93.59% of design capacity

It looks like it is losing around 3% every two months, or 7% in 6 months. That is quite reasonable, and a whole lot better than the capacity decay rate with my previous usage pattern.

However I have had several instances where my laptop switched off when after plugging it into mains I removed the battery to prevent it from being recharged and to keep it cooler. Overall this has not been an issue, even if it seems fairly random (I suspect some firmware bug, as in those case the light that says power is coming from the battery remains on even if it is removed and there is mains power).

090614 Sun When partitioning make sense, and multihoming

My standard computer and network deployment template is that of a local internet composed of relatively small (a few dozen nodes and users) and simple LANs that have local servers and connect to one or more backbone ntworks with global communication servers. The goal is to minimize dependencies via location and replication of servers.

The crucial assumptions are that interruptions in gloobal services (e.g. email forwarding) are motre tolerable than those in local services (e.g. mail sending and mailbox storage) and that usage patterns and thus servers and networks are partitionanble. Another assumption is that when some problem happens it is easier to analyze and resolve in the context of a small simple LAN than a complex global one, and similarly for maintenance.

The question then is how often and practical is to partition large users communities into smaller simpler ones, and the answer is that for many important case it is quite easy.

The typical examples that occur to me are communities of office users, of programmers, of science researchers. In all these cases there are two important aspects:

The communities cluster naturally
Typically office workers cluster by team within a group, by group within a department. Developers cluster by subsystyem and project. Science researchers cluster by laboratory or theoretical technique. Communication and sharing across unrelated clusters is often rather small.
Services are naturally partitionable
Also because of natural clustering, but independently, many generic services partition easily because they are personal, or can be made personal by replication. After all most users can still do a lot of useful work using a standalone laptop or a home desktop. The internet services that most people use (DNS, email, search, ...) can be easily partitioned and replicated.

The latter point is very important: for many categories of users interaction via a shared repository is simply not necessary. This is largely because critical shared repositories are rarely needed. For example, user home directories can well be partitioned on several servers, as in many cases users exchange files via other means than copying from one home directry to another, and even if that is desired, each client can mount multiple file servers.

090607 Sun Even faster disk image backups

I have already remarked that currently just about the only sensible way to backup a disk drive is to another disk drive both because of cost and speed. As to the latter the 1TB drives that I recently bought allow me to do quite fast disk-image backups, for example (on the outer tracks) using a dd pipe (with both dd instance with flag direct):

'/dev/sdb3' to '/dev/sdd3': 13868+1 records in
13868+1 records out
14542295040 bytes (15 GB) copied, 131.4 seconds, 111 MB/s
13868+1 records in
13868+1 records out
14542295040 bytes (15 GB) copied, 131.402 seconds, 111 MB/s

That feels like a nice improvement on the 250GB drives I bought a couple of years ago.

090606 Sat Massive upgrades to my main desktop

In the past few weeks I have done a massive upgrade to my main desktop PC, which has taken a lot of time mostly because it has involved a reorganization of my disk filesystems, to resize and move them around. Also the PSU had to be replaced. Also, one of the drives turned out to have developed some defective blocks, so that required some restoration from backups. I also decided to install on it CentOS 5 instead of Fedora (I was still on version 8). Overall I probably spent 5-6 days on it, most of that copying filesystem around and testing disk drives.

The current configuration has:

Gigabyte GZ-X1 case

This case is small and very cheap. A bit cramped, but fairly convenient, and has excellent airflow with a front and back 120mm fans, which are very quiet spinning at 1000RPM. Also both fixing cards and hard disks does not require screws.

The major defect is that the cool front cover blocks the fron fan intake and raises disk temperatures by around 15C. I don't mind taking off the front cover, but it is such a stupid idea.

Asus M4A78-E motherboard

This motherboard is based on the AMD 790GX chipset and it has a built in HD3300 GPU, and some cool features such as FireWire, HDMI, DVI, eSATA sockets. Most importantly it also supports the EDAC feature of the memory controller in recent AMD CPUs.

The price if fairly low considering that the built-in GPU is not too bad (can run Doom3 engine based games fairly well), is quite quiet (no need of graphics card cooling if one is happy with the built-in GPU), and it has a lot of ports. It also supports two PCIe x8 slots, which can be useful not just for dual graphics cards, but also for having two 4x or 8x cards, such as network or storage cards.

It is somewhat disappointing that none of the onboard sensors are supported by the Linux sensors package, which means that one is blind to environmental conditions.

I think that the sound chip is also not supported by current ALSA versions, and there is not yet a Linux driver for the network chip, but that does not matter to me as I use a CMI9738 based sound card and an Intel e1000 based network card anyhow.

AMD Phenom X3 720 CPU

This CPU has impressed reviewers, and has a fairly competive pricing. The 3rd level cache is 6MiB, which is quite generous, and the same quantity as for the 4-CPU variant. A 3 CPU chip seems to me a good deal as very few applications can use 2 CPUs, never mind 4. 3 CPUs allows one to run the applications that are optimized for 2 CPUs plus a foreground task.

Since this CPU is built with a recent 45nm process and is carefully designed it seems to consume not much current and to run faily cool, and the AMD provided heatsink and fank seem fairly quiet and effective. It has some nice details, for example each CPU can run at several frequencies between 800MHz and the top 2800Mhz, which of course allows for significant power saving during interactive use.

It is a bit disappointing that the Linxu kernel does not seem to support yet the EDAC for this K10 generation chip.

2×1GiB Kingston DDR2-800 ECC memory modules
These do not cost much more than non-ECC modules and seem to be fairly fast and perform well, and with two modules the CPU memory controller can run them in multiple channel mode.
2×1TB and 2×500GB disk drives
The two 1TB drives are main and warm backup, and same for the two 500GB drives. I also have two external SATA 1TB and one external eSATA 500GB drive for cold backup.

Overall my impression is quite positive, both in terms of absolute performance and in terms of the price paid for it. The most impressive features are how quiet the system is, thanks to the large slow moving case fans, the low power consumption of the CPU, and the absence of a graphics card and its whiny fan.

One of the most impressive numbers is the memory bandwidth, which is implicit in the figure reported by hdparm for page cach IO. While my laptop and previous desktop can read from the page cache at slightly less than 1GiB/s, the Phenom X3 and the 790GX chipset allow reading at 7.5GiB/s. Note that reading from the Linux page cache is significantly smaller than the raw memory bandwidth.

The memory bandwidth improvement is sensational (and vry welcome as UNIX style operating systems like Linux can be fairly memory bandwidth bound), and the absolute value is very impressive too, as I see slightly less at 6.9GiB/s on a server class Dell PowereEdge 2950 system with 3GHz Xeon 5160 CPUs, and 12GiB/s on a more recent system from SuperMicro with 2.5GHz Xeon 5420 CPUs.

090605 Fri Impressive 2.5" drive performance

The hard drive I had put in my laptop has developed 4 areas with many bad blocks (probably because of my rough usage) so I decided to replace it (even if overall the percentage of bad blocks is minuscule). My nice Toshiba U300 came originally with a 160GB drive from Fujitsu (not a Toshiba drive, as the laptop is actually manufactured by Compal like the HP Omnibooks). I wanted to upgrade that so I bought a very nice Toshiba 250MB external USB product (as it was cheaper than the bare drive, which happens quite often recently), hoping that since it was designed to be portable and powered off a USB cable it would be particularly robust and with low power consumption, and it has been pretty good.

This time however I wanted to chance something faster, so I looked at flash drives, finding a fairly good deal, where a Corsair (relabeled from Samsung) 64GB flash drive would cost around £120, but I decided to buy another 250GB disc drive as a temporary solution for around £50-60 until then price of larger flash drive would come down. I had then some regret as I found later that a similar 128GB flash drive would cost around £170. Both drives seem to be able to do 90MB/s reading and 70MB/s doing streaming bulk transfers.

But then 250GB hard disc drive, a Seagate Momentus 7200.3 arrived, the one I had chosen as I wanted to try a 7200RPM 2.5" drive and it seemed to draw relatively low power.

It turned out to be amazingly fast too, at around 90MB/s reading and 80MB/s writing (directly on the block device) the outer tracks. These transfer rates are as good or better than equivalent 3.5" drives, and with power consumption of 5W during startup and 2-2.5W during operation.

For comparison, some simple transfer rate tests across my 2 desktop PCs and my laptop. The first test is my laptop, which has a C2D CPU at 1.5GHz with DDR2-667 memory, and the Momentus 7200.3 2.5" 7200RPM SATA II drive mentioned above:

# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   1714 MB in  2.00 seconds = 857.41 MB/sec
 Timing buffered disk reads:  256 MB in  3.00 seconds =  85.27 MB/sec

Then there is an Athlon 64 2GHz with 64 bit DDR-400 memory, and a Seagate ST3250823A 3.5" 7200RPM 250GB ATA drive:

# hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:   1996 MB in  2.00 seconds = 997.37 MB/sec
 Timing buffered disk reads:  200 MB in  3.02 seconds =  66.13 MB/sec

Then the most recent, a Phenom X3 2.8Ghz with DDR2-800 memory, with a 3.5" 1TB Hitachi GST 7200RPM SATA II HDT721010SLA360:

# hdparm -tT /dev/sdd

/dev/sdd:
 Timing cached reads:   15000 MB in  1.99 seconds = 7519.65 MB/sec
 Timing buffered disk reads:  330 MB in  3.00 seconds = 109.96 MB/sec
and a 3.5" 500GB Western Digital 7200RPM SATA II WD5000AAKS:
# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   14952 MB in  2.00 seconds = 7494.02 MB/sec
 Timing buffered disk reads:  284 MB in  3.02 seconds =  94.16 MB/sec

Also using Bonnie 1.4 for comparison with recent tests with it on the same or similar drives:

....
Using O_DIRECT for block based I/O
Writing with putc()...         done:  29027 kB/s  75.7 %CPU
Rewriting...                   done:  25084 kB/s   1.7 %CPU
Writing intelligently...       done:  84726 kB/s   2.0 %CPU
Reading with getc()...         done:  12125 kB/s  53.0 %CPU
Reading intelligently...       done:  84643 kB/s   1.5 %CPU
Seek numbers calculated on first volume only
Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
              ---Sequential Output (nosync)--- ---Sequential Input-- --Rnd Seek-
              -Per Char- -DIOBlock- -DRewrite- -Per Char- -DIOBlock- --04k (03)-
Machine    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU   /sec %CPU
tree.t 4* 400 29027 75.7 84726  2.0 25084  1.7 12125 53.0 84643  1.5  178.2  0.7

The 2.5" drive is nearly as fast (at sequential transfers) as the 1TB 3.5" drive, and has a random seek rate slightly higher than the 3.5" 500GB drive.

Looking at these numbers and the detailed specs it has much the same transfer rate and seek rate, lower capacity, much lower startup and operating currents, much higher shock resistance, much lower noise than recent 3.5" drives. So I am farily happy about it, even if I would have preferred to buy the version with anti-shock locking built-in.

However I shall buy a flash drive to replace it when the 250GB ones will drop in price to £250 or less. Sure, a lot more expensive, but the resistance to shock is rather important (this is the second laptop drive that I had to replace because of rough handling).