Archives

Categories

Google is Good for the Environment

Google has just announced the Recharge project. They are converting some of their own fleet of Prius and other hybrid cars to be “plug-in hybrids”, this means that the car can be plugged in to mains power to charge it’s batteries and petrol will only be used as a fuel of last resort. If a car is mostly used for short trips then the petrol use is dramatically reduced – but the car still has the 1000Km range that a full tank of petrol provides!

Google is also going to invest $10,000,000 in companies that develop technologies related to hybrid vehicles. If you have some ideas for new technological developments related to power saving then you might want to check out what Google is doing.

Terrorism Foolishness

The Age has published a remarkably stupid article about terrorism titled “It’s hard to prevent the hard to imagine” which contains some amusing statements such as “a plan to use liquid explosives hidden in soft-drink bottles and destroy commercial jets crossing the Atlantic. The scale of this plot, combined with the innovative bomb design, threatened to kill thousands of people and cause massive disruption to global commerce“. This however has been debunked by many chemists, here is one of the many expert analysis of the claims.

Here’s another inane claim from The Age “So the perpetrators in the UK looked elsewhere and compiled a crude yet potentially deadly bomb from materials available in everyday life — a mix of gas cylinders, petrol and nails. Finding a way to govern access to such otherwise mundane items will be expensive, and perhaps ultimately, impossible.“. It’s surprising that The Age editorial team were unable to find someone who knows the basics of chemistry or who has ever had a need to start a fire to review the article. Everyone should know that an oxidising agent is necessary for combustion – and a huge quantity of an oxidising agent is needed for an explosion. Petrol vapour won’t ignite if it’s too concentrated (it can displace enough oxygen to prevent combustion). When a gas cylinder is damaged and set alight you get a fireball surrounding it which may be several meters wide (the one occasion that I witnessed a damaged gas cylinder on fire the fire-ball was about 4 meters wide). But no explosion. To propell nails or other solid objects you need the combustion to be rapid and only on one side of the object. Combustion on all sides (IE a 4 meter wide fire-ball) will not propell nails. Here’s what a British Army bomb-disposal operator has to say about it in The Register.

If you want to talk about dangerous items that are difficult to control how about cars? A terrorist who drove a 4WD along the footpath of Oxford St could potentially kill more people than the London bombings and would take almost no preparation.

The article inevitably concludes with claims about the efforts that al Qaeda operatives are supposedly making to recruit people for terrorist missions. Naturally it ignores the best recruiting method of al Qaeda – the huge civilian death toll in Iraq since the US led invasion. The best available medical research (by researchers from Johns Hopkins University and published in The Lancet – the most reputable and prestigious medical journal) estimates that there were 655,000 “excess deaths” as a result of the invasion in the period up to July 2006. Over the last year the best available reports suggest that the violence in Iraq has got worse (among other things the number of US air-strikes is twice what it was last year).

For more analysis of the fear-mongering being done by much of the media (including The Age) here’s another article from The Register.

It’s interesting to read The Age’s article Truth first casualty of the internet?. Maybe they should publish an article titled Intelligence first casualty of print media?.

Robots vs Sheep

Mark Greenaway writes about writes about robots being designed to remove weeds from farms. This seems like a bad idea given that we currently have an energy crisis due to CO2 emissions from power plants causing environment change (including reduced water supplies), and coal and nuclear power plants requiring water to produce electricity (pity about the reduced water supply). Introducing robots that require either electricity of petrol for operation and also maintenance (which probably requires plastic parts on occasion) seems to be more of a problem than a solution.

Fortunately there is already work in progress on training sheep to eat weeds. Given that we already raise sheep for wool and food it makes more sense for them to eat unwanted vegetation (weeds in a vineyard is the example given) than to grow grass specially for them.

Also Mark says that the recent increase in oil price is not good news. What would be ideal is a slow steady increase in petrol prices that allows individuals and companies to change to more efficient vehicles (smaller and slower vehicles, hybrid vehicles, and more use of public transport) and also allows governments to make changes (such as building new public transport infrastructure). Having the oil remain cheap until it starts to run out doesn’t do anyone any good (apart from the short-term interests of oil companies).

Fragmenting Information about Jobs

A comment on my previous post about my Linux Jobs Blog suggested that I shouldn’t fragment the information.

However I believe that fragmenting the information is ideal due to the ability of RSS syndication to drive the cost of coalescing the information to almost zero!

Currently there is a Linux job web site run by Linux Australia. It doesn’t have many adverts and isn’t even linked from the main Linux Australia web site. I believe that we can do better for the people who want Linux jobs and the people who have such jobs to advertise.

If you have a central site the jobs have to be moderated (which takes work and delays listing), the larger the area that the site covers the greater the work is to do this.

The solution is to have a distributed system with different people running listings for various regions and a syndication service to aggregate them. To start this I have created a blog which will have categories for the states and territories of Australia. Someone who is only interested in one region can visit the category for that region. Then recruiting agencies and companies which regularly hire Linux people can start their own RSS feeds to be syndicated in a planet instance for each state and territory. This gives a faster and more efficient response (adverts will appear quickly, can be changed or removed at any time, and less effort for moderation. I expect that recruiting agencies will occasionally post off-topic entries – but when their feed gets removed from the Planet installation they will probably make a commitment to do the right thing in future.

Planet installations can syndicate other Planet installations, so we can easily have a Linux jobs Planet for Australia (possibly run by Linux Australia) that syndicates the feeds from each state and territory.

In the long term I think that the best way of running this is to have Linux Australia run the central Planet instance and a LUG in each region run the local site. I started running it myself because I didn’t get a positive response when suggesting it to the relevant people in Linux Australia and LUV. That didn’t deter me, so I decided to set it up myself. If the idea takes off and if Linux Australia and the LUGs want to take it over I’ll be happy to use HTTP redirects to send the traffic to them – and help them with the sys-admin work if asked.

Also there is nothing specific to Australia in this idea. I am only interested in Australia because if I was to attempt to do it in a larger area (such as the EU) then I could spend all my time on it without gaining a critical mass in any region.

If you are interested in running this in your region then you need to set up a blog (for adverts that are sent to you via email) and a Planet installation that feeds from your blog and any other Linux job advert blogs in your region. If your country doesn’t already have a central Planet for jobs then creating a separate Planet installation for your country would be a good idea too. I will be happy to run a Planet installation for world-wide Linux job adverts (at least until I can convince an organization such as Linux International to run it) if this idea takes off in other countries.

Some people have asked what the benefit of a Planet is over a mailing list. You have to subscribe to a mailing list while with a Planet you can immediately visit it if you suddenly decide to find a new job. Subscribing to mailing lists for jobs from all countries would never work, but visiting a Planet for Linux jobs world-wide and then visiting a sub-planet for regional jobs would be quick and easy.

The War Was About Oil!

They admit the truth at last: “We need to ensure, notwithstanding the significant natural resources that our country has been blessed with, that we are able to access the energy requirements in our region and throughout the world” said Brendan Nelson (Australian defence minister).

John Howard isn’t admitting it yet, he’s sticking to his lie from 2003 that Iraq had Weapons of Mass Destruction.

CPU time use from WordPress Javascript

Currently I have some significant problems with Javascript CPU use when editing my WordPress blog. Some operations take about 10 seconds to complete which involves Konqueror using 100% CPU time. Does anyone have any ideas how to solve this problem? Is there a web browser that pre-compiles Javascript for faster execution?

I am assuming that it’s Javascript at fault, because apart from that there’s nothing complex in the WordPress web pages.

This is an important issue for me as the Konqueror CPU use is the only thing that makes me want to use a faster computer. Apart from that my 3 year old Thinkpad should be able to last at least another couple of years. I recently had my keyboard replaced just before the warrantee ran out and would like to keep using it until I’ve worn out the new keyboard (I have worn out about 6 Thinkpad keyboards, thanks IBM/Lenovo for continually replacing them for me).

Linux Job Ads

It seems to me that we need to have syndicated feeds for Linux job adverts. To start this I have created a new blog for Linux job adverts, it will have categories for the states and territories of Australia (with a feed for each category) and I will also create Planet installations that take feeds from the blog as well as any other Linux jobs RSS feeds. I will create the Planet installations when I have feeds to add.

If your company regularly advertises Linux jobs in Australia then please create an RSS feed of the adverts and I will syndicate it. If your company occasionally advertises Linux jobs then you can email them to me.

As of this moment there are no positions advertised, but I hope that to change soon.

New Storage Developments

Eweek has an article on a new 1TB Seagate drive. Most home users don’t have a need for 1TB of storage (the only way I’ve ever filled a 300G drive is by using it for multiple backups) and enterprise customers generally want small fast drives (with <100G drives still being sold for servers).

One interesting thing to note about this is the fact that the new drive is described as being able to sustain 105MB/s (although I suspect that is only for the first few zones of the disk – see my ZCAV results page for graphs of the performance of some typical disks). The previous disks that I have seen have topped out at about 90MB/s. However even if the drive could deliver 105MB/s over it’s entire capacity it would take almost 3 hours to perform a backup – increases in IO speeds have not been keeping up with capacity increases. Another interesting thing is the potential for using the same technology in low power 2.5 inch disks. While a 1TB disk isn’t going to be much use to me a 300G 2.5inch disk that uses less power will be very useful – and it might be possible to perform a backup of such a disk in a reasonable amount of time!

The latest trend in PCs seems to be small form factor (SFF) and low power machines that don’t have space for two drives. If you want RAID-1 on your home machines for reliability then that isn’t very convenient. But two 2.5 inch disks can fit in less space than a single 3.5 inch disk and therefore all the SATA based SFF machines that are currently being shipped with a single 3.5 inch disk can be upgraded to a pair of 2.5 inch disks – this will be convenient for me when those machines start going cheap at auction next year!

Even for servers the trend seems to be towards 2.5 inch disks. I recently bought a 2U HP server that supports up to 8 hot-swap SFF disks, I wonder how the performance of 8*SFF disks would compare to 4 of the bigger and faster disks.

The next thing we need is a method of backing up large volumes of data. The 650M data CD came out when a 150M disk was considered big. The 4.7G data DVD started to become popular when 45G disks were considered big. Now almost everyone has 300G disks and 1TB disks are becoming available yet the best commonly available backup method is a double-layer DVD at 9.4G – it seems that the vast majority of home users that make backups are using cheap IDE disks to do so. Fortunately there are some new technology developments that may improve the situation. Call/Recall has developed technology that may permit multiple terabytes of storage on an optical disk. It’s yet to be seen whether their technology lives up to the claims made about it, but we have to hope. The current storage situation is getting unmanagable.

Committing Data to Disk

I’ve just watched the video of Stewart Smith’s LCA talk Eat My Data about writing applications to store data reliably and not lose it. The reason I watched it was not to learn about how to correctly write such programs, but so that I could recommend it to other people.

Recently I have had problems with a system (that I won’t name) which used fwrite() to write data to disk and then used fflush() to commit it! Below is a section from the fflush(3) man page:

NOTES
       Note that fflush() only flushes the user space buffers provided by  the
       C  library.   To  ensure that the data is physically stored on disk the
       kernel buffers must be flushed too, e.g. with sync(2) or fsync(2).

Does no-one read the man pages for library calls that they use?

Then recently I discovered (after losing some data) that both dpkg and rpm do not call fsync() after writing package files to disk. The vast majority of Linux systems use either dpkg or rpm to manage their packages. All those systems are vulnerable to data loss if the power fails, a cluster STONITH event occurs, or any other unexpected reboot happens shortly after a package is installed. This means that you can use the distribution defined interface for installing a package, be told that the package was successfully installed, have a crash or power failure, and then find that only some parts of the package were installed. So far I have agreement from Jeff Johnson that RPM 5 will use fsync(), no agreement from Debian people that this would be a good idea, and I have not yet reported it as a bug in SUSE and Red Hat (I’d rather get it fixed upstream first).

During his talk Stewart says sarcastically “everyone uses the same filesystem because it’s the one true way“. Unfortunately I’m getting this reaction from many people when reporting data consistency issues that arise on XFS. The fact that Ext3 by default will delay writes by up to 5 seconds for performance (which can be changed by a mount option) and that XFS will default to delaying up to 30 seconds means that some race conditions will be more likely to occur on XFS than in the default configuration of Ext3. This doesn’t mean that they won’t occur on Ext3, and certainly doesn’t mean that you can rely on such programs working on Ext3.

Ext3 does however have the data=ordered mount option (which seems to be the default configuration on Debian and on Red Hat systems), this means that meta-data is committed to disk after the data blocks that it referrs to. This means that an operation of writing to a temporary file and then renaming it should give the desired result. Of course it’s bad luck for dpkg and rpm users who use Ext3 but decided to use data=writeback as they get better performance but significantly less reliability.

Also we have to consider the range of filesystems that may be used. Debian supports Linux and HURD kernels as main projects and there are less supported sub-projects for the NetBSD, FreeBSD, and OpenBSD kernels as well as Solaris. Each of these kernels has different implementations of the filesystems that are in common and some have native filesystems that are not supported on Linux at all. It is not reasonable to assume that all of these filesystems have the same caching algorithms as Ext3 or that they are unlike XFS. The RPM tool is mainly known for being used on Red Hat distributions (Fedora and RHEL) and on SuSE – these distributions include support for Ext2/3, ReiserFS, and XFS as root filesystems. RPM is also used on BSD Unix and on other platforms that have different filesystems and different caching algorithms.

One objection that was made to using fsync() was the fact that cheap and nasty hard drives have write-back caches that are volatile (their contents dissappear on power loss). As with such drives reliable operation will be impossible so why not just give up! Pity about the people with good hard drives that don’t do such foolishness, maybe they are expected to lose data as an expression of solidarity with people who buy the cheap and nasty hardware.

Package installation would be expected to be slower if all files are sync’d. One method of mitigating this is to write a large number of files (EG up to a maximum of 900) and then call fsync() on each of them in a loop. After the last file has been written the first file may have been entirely committed to disk, and calling fsync() on one file may result in other files being synchronised too. Another issue is that the only time package installation speed really matters is during an initial OS install. It should not be difficult to provide an option to not call fsync() for use during the OS install (where any error would result in aborting the install anyway).

Update: If you are interested in disk performance then you might want to visit the Benchmark category of my blog, my Bonnie++ storage benchmark and my Postal mail server benchmark.

Update: This is the most popular post I’ve written so far. I would appreciate some comments about what you are interested in so I can write more posts that get such interest. Also please see the Future Posts page for any other general suggestions.

Strange SATA Disk Performance

Below is a GNUPlot graph of ZCAV output from a 250G SATA disk. The disk has something wrong with it (other disks of the same brand in machines of the same configuration give more regular graphs). The expected graph will start high on the Y scale (MB/s) and steadily drop as the reads go to shorter tracks near the spindle. The ZCAV results page has some examples of the expected results.

If you have any ideas as to what might cause this performance result then please make a comment on this blog post.

graph of strange SATA performance

Update: This problem is solved, I’ve written a new post explaining the answer. It’s a pity that an NDA delayed my publication of this information.