Optimising a read mostly write sometimes application

About 6 years ago I created a web based application using J2EE, a DAO layer using JDBC to a PostgreSQL database. The J2EE application container ran on its own server, and the PostgreSQL on a dedicated server as well. The two servers were connected with fast gigabit ethernet. The DB is located on a SAN attached to the database server using Fibre Channel.

The main database size has since grown, and is now 110GB. The largest table has about 180 million rows, and there are about 136 tables. When I wrote it originally, multicored CPU's did not exist. Servers with multiple CPU's did, but the system was never deployed on such a configuration.

There is a process that runs once a month that performs a lot of reads on the database, perform some calculations and then writes the data to several tables. This process recently took 491 minutes to complete.

Full Article

How to break FakeRAID and LVM on Ubuntu 11.04

My setup was as follows. I had Ubuntu 9.04 x64 installed on a single 1TB SATA drive. Everything worked fine - I think I had Grub as boot loader. I since upgraded to 10.04. At some stage my hard drive broke and I had to fall back on a backup I had. So I bought two new 1TB drives, connected them to my Gigabyte X58A-UD3R motherboard's SATA2 ports and configured RAID1 in the BIOS.

I do know that the RAID controller(s) on this motherboard does not really implement hardware RAID, but it is the only way I could get the machine to dual boot with Windows and still have RAID. So I configured dmraid in Ubuntu, and set up a LVM. This is called FakeRAID. Everything worked fine. However when I upgraded then to 11.04 I decided to upgrade grub to grub2. That was a fatal mistake. My machine did not boot anymore. I got the grub boot loader, but nothing listed. When I type in exit, it chain loads to another grub instance showing me some bootable OS entries. 1 / 10 times it would boot. This was NOT ideal. But I left the issue as is.

Couple of days ago I added an awesome OCZ Vertex 3 240GB SSD to the SATA3 port on the motherboard. That device was detected as /dev/sdc, with the two FakeRAID HDD's as /dev/sda and /dev/sdb, as before. However this time the system refused to boot at all. I would get the initial grub screen, type in exit, then see a purple screen and nada - nothing boots.

Full Article

Disk Utility in Ubuntu Linux not listing any volumes

I recently had to fiddle with my Ubuntu Linux 11.04 machine to get it working after breaking my FakeRAID mirror. Unfortunately when I tried to launch Disk Utility, it showed a blank canvas - no drives were listed. Long story short, my specific problem turned out to be permission related. Once I changed the file below like this:

-rwsr-xr-- 1 root messagebus 47528 2011-03-20 15:36 /lib/dbus-1.0/dbus-daemon-launch-helper

all was good again.

Precise estimates

In mathematics, and more specifically physics, when one perform measurements of something, you need to specify the accuracy of said measurements. Take for instance your speed. Lets say you measure a set distance to be 10m, and you time someone running those 10 meters in 3 seconds. That means the average speed of the person was 10/3 meters per second.

But anyone who completed Physics 101 would know that it is not accurate to say the average speed was thus 3.3333m/s. This is due to the fact that errors were introduced in the two values being measured. The distance could not have been exactly 10m, and the time could not have been exactly 3 seconds. No device on earth can measure distances and time to perfect accuracy. One can be very accurate, but not perfectly so. Hence the margin of error. So in real life, depending on the measuring equipment used and the method of measuring, lets say the distance was actually 10.02 meters and the time 3.1 seconds. When written down like that, it is implied that the accuracy (not the resolution though) of the distance measurement is accurate to the closest centimeter, and the time measurement is accurate to the closest tenth of a second. Therefore the average speed is 10.02 / 3.1 = 3.2 m/s. I have rounded the result to one decimal point, because the time value is less accurate than my distance measurement and hence negates that extra precision. That settled, I ask you with tears in my eyes, what does "Eliminates 99.99% of most harmfull (sp) germs and bacteria" mean? If you bother to specify a value accurate to the second decimal (i.e. accurate to within 0.005% margin of error), what is the significance of the word "most"?

Eliminates 99.99%...
Eliminates 99.99%...
Full Article

What are these?

I think it is a kind of fungus, but am not sure. If anyone has any ideas, please post it in the comments.

Ghost Plant
Ghost Plant
Full Article