IO speed in Linux

Did I feel oh so stupid.

I purchased HP ML110 server to our company to work as a workgroup-server, threw in three disks, installed Centos 5.2 and configured necessary software for our small team. Everything seemed to work just fine, but from time to time users complained that Alfresco was slow. When I tested, I did not notice anything and thought that it was nothing.

However yesterday I noticed that the server was extrenely slow and disk was running all the time, even though there was nothing particular actually going on in the server. This gave me the reason to actually test and figure out what is going on. As a launched hdparm and started to diagnose the server, I almost fell down from my chair as hdparm said that read/write-speed of my disk was no more than 2 megabytes / sec – when my expected value was supposed to be somewhere between 50 – 80.

Lots of googling and trying to figure out what is wrong and why DMA is not enabled on the drive led me try to edit grub configuration and frustrated search around the options in BIOS-configuration. DMA seemed to be enabled on all the disks, but still Linux identified disks wrongly and mapped them to /dev/hda instead of /dev/sda. Finally I did a lucky guess and tried to change very innocent configuration of Serial-ATA mode from Automatic to Seriat-ATA and lo and behold – it worked!

After that io speeds jumped through the roof all the way to 70 megabytes / sec – and I was finally ready head back home.

Yeah. Felt stupid that I hand’t tested it propely when I installed the software and that I did not notice that io was over 20 times slower than it was supposed to be.

Works now, and hopedully this posting helps others that have similar problems in the future.

Tallennettu aiheeseen technology. Jätä kommentti »

Solaris and Amazon EC 2

Solaris is making its way to Amazon EC2 – and frankly becoming a platform to be taken into consideration, even though you would have had invested your energy and effort previously only to Linux. Solaris is little bit different beast, but my god there are some features that really should get administrators’ and developers’ attention.

I have my friend Gumi to thank for bringing Solaris also to my radar. ZFS and Dtrace are tools that do change the game a bit and provide a compelling framework of tools, compared to similar tools on Linux-side.

For example at the moment you could quite nicely set up mysql and do backups with LVM ( http://blog.dbadojo.com/2007/09/mysql-backups-using-lvm-snapshots.html ). Same thing could be done with ZFS too, except that it is just prettier: http://blogs.sun.com/ec2/entry/zfs_snapshots_to_and_from

At the moment I’m not running anything really on Solaris, since the cognitive burden to adopt Solaris is larger than continue to work on familiar tools on Linux, when Linux-features are quite sufficient. However I do need to start to do transtition and preparations to be able to run services also on Solaris. As Sun will provide support and make sure that their stack SAMP-stacks and java-stacks work well in EC2 too, it will be an easy choise for a base architecture on almost any new web-application.

http://blogs.sun.com/ec2/

I’m looking forward testing Solaris on EC2, running ZFS and having most important data on persistent disk – snapshots put into S3. By creating own Solaris image with all the software configured properly and data returned from S3 – it should be next to trivial to script a system that sets up new instances on the need basis and initializes the data based on last snapshot. If these instances would be – for example front end servers with mysql slaves – it should not take a long time for those to replicate changed data from the master and be then ready to join into the cluster.

Brave new world. Indeed. No longer large upfront payments for scalable infrastructure.

Tallennettu aiheeseen programming, technology. Jätä kommentti »

Today

Tallennettu aiheeseen Uncategorized. Jätä kommentti »

Quite an experience to live in fear, isn’t it? That’s what it is to be a slave.

There has been said so much about the Blade Runner and for a good reason. I took some time to look the director’s cut again and realized that the experience was again different and personal interpretation had very different tones to it. As I’ve gained some age and also understoof the finity of my own life does the Blade Runner also come to life in new terms. Sure I had seen Blade Runner dozens of times before, sure I had analyzed and read different analysis about it before. Sure I knew – but then again I did not really know. Somehow the movie now struck a chord more than ever before.

Tallennettu aiheeseen life. Jätä kommentti »

Tools, tools and tools

It’s nice to from time to time check how technology has developed end what new tools are available to do your job better – or at least see where the world might be going to. Lately I’ve spent some time reading and learning about numerous things, including functional programming and distributed sourcecode versioning systems – but neither of them has yet really rocked my boat.

I’ve read something about both Erlang and Haskell, and yes – I do see some of the value and ideas in functional programming style, but somehow I feel really really hesitant to switch my Java and Python programming environments with tested and proven libraries to emerging ones in Haskell domain. Erlang is well tested in networking world, but the models to think about building applications for the domains where I work now seem little strange at the moment – not the mention the troubles I would be trying to find other people to collaborate and work with me, if the system would be built in Erlang.

But still. I have interests towards both of the languages, if not in any other sense then at least to understand why some of the cool kids are playing with those. Erlang’s concurrency model for example is something would be interesting to learn and understand better the beauty in it’s simplicity.

Ruby of course would also be a natural item to be had on the to-do -list, but somehow I haven’t really found the thing in Ruby compared to Python. And more importantly – Python people have always seem to be much nicer folk than Rubyists. I have personally nothing against Ruby, but I do have something against self centered arrogant Ruby pricks, who behave like Ruby is the last important thing after sliced bread. I pick Guido over those guys any day.

Distributed sourcecode versioning is another thing that has not yet been of great importance to me, but I’ve spent some time figuring out why other people make such a fuzz over it. At the moment my own projects are just happy to be controlled in Subversion, even though Linus says that the model would be fundamentally flawed. Let it be so, but for now the experience of using subversion with well tested gui tools and plugins for example in Eclipse is just so much better than with more experimental tools available for Mercurial or Git.

For me, the experience matters – sometimes even more than the features, since good features are useless if they are not easily usable. I hate it if I need to pay large cognitive burden with new tools, before I can do something simple. After small tests Git is definitely the most promising DVCS, and most likely will be my choise when either the Gui-tools in Eclipse improve or I get a project, where taking git into use is less of a hassle than the features it provides.

For me git’s branching features seem really, really cool and do change the workflow that programmers have or can have. For now subversion is enough for me in my and our project, but one shall see if I will make a small testproject in github and or transfer some subprojects into git if and when we share work more work between multiple partners.

Tallennettu aiheeseen programming, technology. Jätä kommentti »

Alfresco and Cifs: disable desktop actions

http://wiki.alfresco.com/wiki/Desktop_Actions

If you don’t want to see desktop action ( __CheckInOut.exe etc. ) in your CIFS-mapped drives, they are easy to configure out from you filesystem settings. Just find your configuration ( propably something like file-servers-custom.xml ) and remove lines in desktopActions and restart Alfresco.

Tallennettu aiheeseen technology. Jätä kommentti »

Eclipse 3.4 and Subversive

http://www.eclipse.org/subversive/documentation/gettingStarted/aboutSubversive/install.php

http://www.eclipse.org/newsportal/article.php?id=701&group=eclipse.technology.subversive#701

Hate it when everything is not tested properly and users waste time figuring out what whent foobar.

I wish subclipse would work just out of the box with Eclipse 3.4 soon.

Tallennettu aiheeseen technology. Jätä kommentti »