Friday, April 24, 2009

Overwhelmed

Last week on 17th April was our first marriage anniversary. The last year has easily been the best of my life - filled with love, affection, laughter and lots of success for both of us. We definitely planned to celebrate it in a big way and Goa was an ideal place for a romantic getaway.

We stayed a Lemon Tree Amarante hotel and the stay was comfortable and leisurely. With the beach just about 500 meters away and an awesome pool(with a pool bar), this is just about the ideal Goa hotel. It was great fun to watch DVDs on the LCD TV provided in each room.


The Goa beaches were full of life with lots of shacks providing awesome cocktails and really tasty food. There was a cool breeze soothing us all through the day. Chilling out in each others company on the beach for hours together was really memorable.


The icing on the cake were the cute and brilliant gifts given to me by Komal. She gave me all of four gifts, each one better than the other:


A very nice photo of ours engraved in a crystal. The platform on which it is elevated beautifies it with different colors being dispersed.







XMini capsule speakers

A very compact and cute speaker for our iTouch with surprisingly good sound quality for its size. It has a cool battery life of 8 hours and can also be charged through USB port.






A magnificent diamond studded gold pendant with our initials. This design is Komal's handiwork - really creative.







The tale of our life as a conglomeration of pictures. Komal blew me away with her artistic skills and creativity with this one. She must have spent long hours making this amazing piece of work. Though to be honest, its beauty is not reflected in these pics - it looks much more beautiful in real life.








Cute collage of my pics when I was little and was actually sweet.










Collage of Komal's college life pics. Looking beautiful wifu!












A great pic with awesome expressions!











Dinner at the "Beach House" restaurant at the Taj. The ambience was exhilarating - overlooking the sea, with a beautiful breeze and awesome food. Gotta go and stay at Taj sometime - its a different experience which cannot be put into words.



Monday, April 20, 2009

Oracle buys Sun

That Sun was putting itself out in the market and someone would step up to pay a decent price was written in stone. And finally it has happened with Oracle buying Sun.

Personally I think this is a good deal for Sun. Before the talks with IBM, Sun stock was trading around $3-4 and now they are being sold at $9.50 per share. That is a very good deal for the investors and Sun employees. IBM and Sun had many similar products and would certainly have resulted in job losses. Oracle is flush with money and will surely continue to invest in Sun products since there is little overlap.

Some of my interesting thoughts about this deal:
  • Oracle must be loving the thought of owning Java since its the crucial glue in their software offerings.
  • Contrary to popular perception, Oracle won't kill MySQL - instead they will continue investing in it so that they get an entry in the low-end database market. Customers can then be upgraded to Oracle as they grow - a win-win situation for Oracle. Note that since MySQL is open-source if Oracle won't develop it, someone else surely will.
  • Oracle now has access to the entire storage stack - Oracle database running on Java, ZFS, Sun hardware, Oracle backed Linux. That is a pretty strong offering.
  • Every M&A deal brings with it some amount of layoffs, resignations, cultural changes but its this very churn that Sun has needed since a long time. Majority of the people will come of smiling eventually.

Saturday, April 11, 2009

Don't vote for independents and regional parties

I have a fervent plea to all voters - please *DO NOT* vote for independents or regional parties for next 10 years or so. Even if these candidates may be honest, hard-working, result-oriented - please keep them out of power.

I know this logic seems inverted and downright stupid for the uninitiated. But think about it - the only way we can have a strong government is if one of the national parties receives a majority. Only then can the government go forward with development agenda instead of catering to the whims of individuals or factions. I personally don't care if its the BJP or the Congress which gets the majority - come to think of it both of them have tried to do a good job since 1998. BJP did this nation great service by going ahead with the nuclear tests and opening up the economy - in fact it laid the ground-work for the boom we saw post 2004. Congress also tried to make positive reforms in various sectors like insurance, telecom, nuclear deal, etc. but the fear of the Left kept the Congress from doing a stellar job.


Right now the national parties spend half their time hob-knobbing with their so-called allies and only the remainder of the time is given to the people. And I don't blame them. We as a people have failed if we vote on the following basis:
  • caste - needless to say majority of votes are given/taken on the basis of caste and the percentage of people voting on the basis of caste must start reducing
  • regional pride - Vote for the national government on the basis of regionalism is downright stupid. A good independent legislator is *useless*. He cannot push through reforms alone. Democratic governments run on collective ideology, not personal whims. So while it may *seem* like a good idea to vote for a independent candidate with a clean profile, it doesn't help you eventually.
  • Short term promises - The only promises that should be respected are those that have the potential of empowerment - education, skill training, long term infrastructure projects through government spending, making bureaucracy accountable, transparent governance. Promises like reservations, subsidies, freebies only weaken the populace as I have indicated in my previous post - though I must admit it will look attractive to the minimum wage earner.

So my request to you is very simple - look who among BJP or Congress candidate in your region is more better and vote for him.

Ok, now for the skeptics: you will very rightly say that this cannot go on forever. You are right - we should do this only for this and the next election. And hopefully until then the national parties would have given a good account of themselves. Hopefully by then parties like Shiv Sena, MNS, Left, AIADMK, Trinamool, BSP, BJD, etc. would be relegated to the side-lines and we will have successive strong governments at the centre taking India where it should be.

Tuesday, April 7, 2009

NFS tricks

Today while trying to use NFS between different OSes I hit a few problems that I had not seen before. I am listing them down here:

- Since the NFS server had SunOS and client had Linux, they were speaking different NFS protocols. In this case "-o ver=3" option needs to be used so that NFS v3 is used as the protocol.
- The uid and gid on the server and client was not the same and hence permission was being denied. Either I would have to create same UID/GIDs on both server and client, or allow rwx access to all users on the server. I had to choose the latter, since I do not have root access on the server.
- While trying to untar, I hit this error "cannot change ownership to uid X, gid X". This was because while untarring the UID/GID information was being preserved and these were not present on the client. You can get around this by using --no-same-premissions argument for tar.

Wednesday, April 1, 2009

Of the poor, by the poor, for the poor

I came across these comments made by Rahul Gandhi and they made me very angry. Lets consider what all our government already does for the poor:

- subsidized food grains, kerosene
- subsidized petrol, diesel costing approximately 1.3 lakh crore rupees last year
- subsidized work culture since government employees need not be afraid of being fired for not meeting work standards
- farm subsidies including no taxation on agricultural income, free electricity, government regulated fertilizer prices, free power and guess what - free money in the form of loan waivers
- subsidized/free healthcare at government hospitals
- subsidies in form of ailing and loss making government companies

At first glance our government comes across as very noble and seemingly the state of the poor people should be alleviated with all this. Then why have these long drawn policies not led to substantial reduction in our poverty rate? Infact when Nehru was absolutely pro-poor(to the extent of being anti-rich) our growth rate was at its lowest. What are the reasons for this anti-thesis? While many posts can be written on the reasons, I will start with the most basic ones:

  • any robust economy is driven my a minority of the population. This means that in a country of 1+ billion people you cannot expect 70% of the people to be rich/middle class. Whenever the crest of growth of a country is reached, the consumption flattens and leads to deflation - many European countries and Japan is a good example of this. Currently only 3% of the Indian population pays their taxes. Government should try to increase their tax net to 10-20% over next 5 years. And it is this 10-20% which will be driver of the economy creating enough consumption demand to help alleviate poverty of the rest.
Lesson: stop throwing more good money behind bad money. Instead start new projects which pays for services _in lieu_ for something atleast.

  • Huge GDP deficits: Insane government spending mostly in form of subsidies causes large GDP deficits. This means that country has spent more money than it has. Every government _raises_ such money by issuing bonds which are bought by banks, other governments, etc. The more your GDP deficit, the more interest you need to pay because your credit rating gets lowered due to heavy borrowing. This increases governments cost of expenditure and slows down growth in the long term.
  • "false demand": I would stick my neck out and say that if we had lower subsidies we would be much less affected by the current economic crisis. Reason? Any economic cycle consists of cyclical booms and busts. Important thing is to throttle growth when it is driven by credit money. While the international fuel prices were going through the roof, demand in India wad at its peak because prices here were unaffected. Then suddenly the government realized that country's economy will crumble if we keep subsidizing oil and hence the prices were increased suddenly. This jolts the economy. If prices are decided by market fluctuations then demand also gets throttled at the right time. This way while growth may be slower, it lasts longer and we certainly would not need to see 50% stock market drop in 6 months.
  • Giving freebies _for a lifetime_ sets a bad habit among the population. What is being implicitly said here is that if you are ready to accept a poor life we will feed you and keep you alive. We want to empower people, provide them with skills or education and until such time that they are learning you can shower them with freebies but please not forever.

Wednesday, October 3, 2007

Making e2fsck parallel?

Making any fsck checker parallel is fraught with the likelihood that things can go wrong in some setups, with wierd hardwares and with different RAID configurations. XFS have added a prefetch mechanism to xfs_repair which does gives good results in most use-cases but "parallel fsck" is different from "readahead in fsck".

I have a few ideas (scattered, but jotting it down lest I forget them), about having proper parallelization in atleast pass1 (and probably pass2) in e2fsck. Pass1 of e2fsck reads inodes and dumps information into certain data structures, like inode_used_map, block_used_map, directory bitmap, dir block list, etc. Val Henson has recently posted a promising patch which adds readahead threads in pass1of e2fsck where processing of inodes will still be done serially. This does not lend any performance benefits
in a single disk case (though she noted excellent benefits in case of multi-disk RAID arrays).

So coming to the point, I think we can have multiple threads processing on the inodes and dumping information into the pass1 data structures. Contention can be greatly reduced (IMHO made negligible), by having each thread have a cache for each data structure. Each thread can then dump the information into the global shared data structure after its cache is full or after certain time period. This will also speed up e2fsck on single disk machines, as both cores(provided you have a dual-core CPU) can be working parallely.

Another important addition that can be made is to merge read/write requests coming in from different threads, this will especially help reading directory blocks which tend to be scattered around.

But, the fun of all this lies in the implementation, design seems easy enough logically, but implementation would be mired in intricacies. But this seems very interesting to implement.

Thursday, May 17, 2007

Lustre on UML, it works!!!!

I have always hated being dependent on my test machine and finding ways to dump it. VMWare is agonizingly slow and requires a LOT of memory which I cannot afford. Also what if I want to run 5 instances of a kernel??? So the next best option is UML (User Mode Linux), setting it up for basic filesystem programming was easy enough but setting it up for Lustre (www.lustre.org) was a good challenge. Lustre requires networking support, external modules so gcc versions should match, etc. so some extra stuff needs to be configured.

After many futile attempts at getting this done, I finally managed to run Lustre in UML. These are the approximate steps to do it. not for the weak of heart :)

But once it is setup you can work on it just like a test machine and setup a proper cluster with different MDS and OSTs and clients.

1) Patch your linux sources (2.6.18 lets say) with the lustre patches
and compile it for UML.

make defconfig ARCH=um
make menuconfig ARCH=um
select hostfs, loopback support, all ext3 options, universal tun support for networking.
make ARCH=um

2) Presuming you are doing this on fc6, get a fc6 root image from the internet or from me. Boot from the root image by
$ ./linux ubda=FC6_root_image eth0=tuntap,,,192.168.1.254 mem=256M

On your host system, you should set eth0 to the above string and do a tunctl -u root (this means you set the user for the tun, you need tun.ko present)

In UML, do ifconfig eth0 192.168.1.253 up and eth0 will be up in UML. Now add routing info by route add default gw 192.168.1.254 and your network is up.

3) Compile lustre sources with-linux set to your UML folder.

4) In UML, mount the host folder which has lustre like:
mount -t hostfs none -o /mnt/store/my_lustre_path /mnt/host_fs

5) Go to the lustre sources and insmod the modules by hand or run llmount.sh and you are done.
Make sure that host and rootfs use same gcc versions.

Note that there will be a few problems in between but nothing that
google can't solve. Then dump your test machine. :)

Here are some potential problems you may face:
1) UML does not compile on your system. Google and see if you can find some patch from blaisorblade. If not hack away, thats what I did. Deleted some headers and move some defines, whatever needs to be done. Make sure that you dont try to do it on fc6 since fc6 has some utrace patches which stop UML kernel from booting.
2) GCC versions of host and rootfs do not match and hence modules do not get inserted. I tried using a different GCC versions but caused problems.
3) Lustre networking - You may forget setting up the routing table, so you may want to automate it.