My new blog engine looked and felt all fine except for being an extreme resource hog. I have barely 1 GB of RAM on my virtual server from HostEurope, which is more than enough if you just want to run one under-subscribed site. But I also happen to run Spring’s new TC server for my own projects (one of which I should be unveiling by the end of this month). So I decided to explore on how to make the whole blog lean. The process was not easy. First I am on Ubuntu LTS so only the most stable software is available for tunning. So this means I had to compile lots of things by hand. Second there is no complete instruction set for doing so on Hardy (which will be ousted soon by new LTS version). But some instructions are still worth mentioning. I might be tempted to write my own complete DIY nginx,wordpress on php-fpm entry after the new LTS is released.
I decided to go with Nginx and PHP-FPM solution for running Wordpress (and then later I can also put in Passenger for my RoR applications). Nginx is very lean Webserver which is changing the whole landscape of LAMP to LEMP (it’s pronounced as engine-x). I had been using it previously as well but it’s a moving target and has progressed a lot since I last dove into configuration files. There are various resources on the internet addressing this kind of migration but none of them complete. In order to handle redirects as 301 and not as 302 I used this plugin, and this post was extremely helpful in getting the permalinks working properly.
I also got to optimize my MySQL for memory use but I think there is still room for improvement.
Initial tests with a blank TC server and a running blog on stock Apache and Mysql would reat away all the available RAM. Now I have been able to shave off about 100 MB (which is not bad). I will see if running standard Tomcat works as it uses less memory than TCServer (from the looks of it)
Leave the first comment ▶
Posted 2 days ago, under
Meta
I just did it, ported my blogger entries to WordPress, all 200+ of them. And it is a mess. I realize that over the years I have learnt how to write better and express my self in a clearer way. This is all thanks to loads of time reading other people’s blogs and some what maturity. But I still have to be much better at writing and communication in general. Importing blogger is built in to WordPress, you just click and authorize. If only it was so easy to port Typosphre blog entries. I copied the RSS feed of my Typo based blog but without any comments. Hopefully I would be able to move them soon as well. It would be nice to get the comments which appear on my Facebook, reappear on word press as well.
I realize that in the past I have probably put out some naive comments (like about how I would never leave Blogger.com or how much I hate a dish called Nargisi Koftas, some thing I won’t mind munching right now or the worst that how I cannot stand those corporate blogs, I really have come a long way) but since it was all already out there, I thought it’s better to organize it all and bring it under one roof.
I have become more aware of what to put on the web and how to put it. It is fun to see how my personality has changed over the years just by looking at the old blog entries.
Leave the first comment ▶
Posted 6 days ago, under
Meta
After gettnig some inspiration on Lifehacker I finally mustered up the courage to move to wordpress. I decided to do so because I have not much interest in maintaining a blogging system and would like to use some thing which has a solid user base (which gurantess a good eco-system of themes and plugins). Even though it may not be the fastest platform (rails on mongrel) or the coolest to code to work with (hand coded haskell CGI) I am happy with what it has to offer so far.
As you read this I have also moved on from Linode.com to HostEurope.de. Linode was a good service, but I needed a service closer to home and with a little more juice (RAM) packed into it. The installation of wordpress on top of Ubuntu LTS was a breeze compared to what had to be done for Ruby on Rails based Typo.
I will be porting my older blog entries slowly (both from Blogger and Typosphere blogs). I am experimenting with themes and plug-ins. If you would like to suggest any of those, please be my guest.
Leave the first comment ▶
Posted January 20, 2010, under
Linux
For the past few months, I had been trying out Windows 7 exclusively on my laptop. After the intial good impression, I started noticing the cracks. The system would become super slow after a day or two, which is typical of a windows system doing alot of computing. I am still not sure what is the actual reason but it takes ages to fire up simple applications.
Since Google decided to put Chrome for linux in beta and it has some mixed reviews (compared to Windows version) I decided to go over back to linux (that was actually in December, but writing about it now) but this time on 64 bit. Working with 64 bit has been problematic for me in the past as one would need to figure out lots of things. Fortunately lots of the issues from my previous experience with 64 bit ubuntu have been now resolved.
The first problem I ran into was bad performance of Spotify sound under Wine. This was easily solved by moving to wine-1.2 instead of wine. Another problem that I encountered was crashes of browser when I started an Adobe Air application after I started the browser. This is also solved by first starting the Adobe Air app and then starting the browser.
I also used Adobe’s 64 bit pre-release version of flash which solves alot of issues of dancing around 32 bit libraries on 64 bit system. I have actually forgotten about lot’s of issues I fixed during the move, for which I need to put a note to sel: blog when its happening, not weeks later.
Leave the first comment ▶
For the past one year, I have not done much development on my linode machine. When in Pakistan I needed to have a machine which could act as my IRC client as well as my blog engine, email server and a back up drop box. I have been using Linode for over a year now and I am pretty happy with their service. But the problem is that I am under utilizing this service. I can probably get a cheaper or even free service to do all my hosting.
My base line would be some thing which would cost me less than 0.027 US$ per hour. Amazons elastic cloud services might be the way to go as I would like to play around with those services. Renting a dedicated server is probably out of my reach at the moment and will not be needed for my minimal footprint activities. However there are certain benifits of using a mid size provider such as linode (a hint would be that big provider’s IP segments are some times blocked by digital TV aggragators….enough said).
The reasons for moving away from linode would be mere change. I have not been keeping up with server technology for some time now and I don’t necessarily get a chance to play with new things at work. I might as well just try out Amazon AWS for a month and just check it out if its even viable and if it’s not, I always have a realiable VPS to come back to. In any case I would stroing recommend Linode to any one looking for a VPS.
Edit: I have looked up the cost of using Amazon AWS cloud, it costs almost double for the smallest instances, but at the same time offers double the power in terms of memory. After looking into my schedule I have decided to not tinker with my current setup till the next LTS of ubuntu comes out, after which I plan to stick with a production server for the whole lenght of LTS and it also turns out that by the time next LTS comes out I would need to update my system any way.
(30th Dec)Edit: I have piad one more month of dues to Linode. I am on the lookout for a better VPS. If my finances permit I would prefer to go for cloud system (or atleast a bigger VPS for my Java needs).
Leave the first comment ▶
Windows XP is known to the most of the world as “Computer”. It’s every where, even Microsoft can not escape it’s popularity. As a chalmers student we are allowed to get a free Windows copy for personal use, So I decided to use mine to power my home Skype box instead of Ubuntu. The reasons are rather practical, as one cannot get Skype version more that 2.0 on Linux and the latest version for Windows solves all kinds of issues, from incoming Full Screen calls to better audio management.
In Pakistan one cannot use other VOIP services easily for now. May be even skype gets blcoked in the future. i will try to investigate a better solution.
The only other thing besides Skype that i am running is VNCServer and DynDns update client to be able to log into the machine. The dyndns client is not very rasilaint as it does not detect IP changes.
Infact I am sitting more and more on my windows 7 installation out of necessity as it’s video chat in skype is better than what I can get in Linux at the moment. Here is a screen shot of skype video chat with advanced statistics enabled. In this you can see various statistics for a call made to Pakistan from Gothenburg (with one way video). The green needle in the bottom says that the call quality is good (which is rare actually)

One cannot do multiparty video chat with skype. I have found a nice new application called TokBox for that which does if for free. Another utility is from oovoo, but it’s not free for multiparty video chat. This might be enough to push me into writing some thing of my own on top of already available SIP clients.
Leave the first comment ▶
My desktop was getting really messy, so I decided to do a fresh install of Ubuntu. After a fresher install of 32 bit ubuntu on my shiny 64 bit system I decided to consolidate all my email accounts on one box. The problem was that there were no straight instructions on how to get IMAP and SMTP working for student.chalmers.se accouts since their move to outlook.com
Personally I don’t mind MS Exchange based email servers as long as they are configured to run in some what standard mode. To my surprise I could actually get email out of the system, thanks to a French blogger.
I wonder if I can do the same for hotmail (well it’s already being forwarded to my gmail account
Leave the first comment ▶
I have to come clean, I am posting this blog from Windows 7. I do have a very good excuse, my clients, my boss and my parents all require me to be in a windows machine.
You will ask how come? As I have previously mentioned that I have a DIY video conference system in my parent’s home. Apparently with Skype 4.0 which is not available for Linux yet, you can have a much better video call quality. It may also have to do with the webcam driver for my laptop, which is not at par with the windows based driver.
My clients (or to be politically correct, my boss’s clients) are mostly on windows and require help with windows based systems as well as expect windows native solutions (so even working with Java based technologies, I am still expected to come up with .exe files and installers)
But it’s not that bad. I am coming back to windows after a very long time and after good changes in it. Windows 7 is actually a very slick system, but it does lack the raw power of any linux system. Hopefully I will be able to own a second machine in coming future to have as a windows only machine (I am thinking about Nokia netbook with 12 hour battery life). FYI I have a genuine windows dvd, thanks to Chalmers academic alliance with Microsoft.
One thing which I discovered while on my new system is that my extended screen was flickering rather bad. I googled (binged?) it up and found that it could be my battery or the charger. Taking out the battery did solve the problem, I have yet to get my charge cable checked to see which problem is it (battery or charger). But while digging up information on battery health I came across page from BatteryCare(which I discovered thanks to lifehacker) detailing proper laptop battery usage guide. I had never really read up on battery care before so I will try to follow these suggestions from now at least.
I now have a battery wear level of around 30% on my laptop which considering my usage and the life of the battery (18 months almost continuous use) is not that bad.

Leave the first comment ▶
My fifth quarter and third semester at chalmers has started. It´s only been a week and I already feel the load. Between my half time job (as a system integrator/software developer) and full time studies, I don´t think I would be able to find time to do any thing.
This quater I am taking two courses, Fault tolerant systems and concurrent programming. Both fit very nicely in my goals of becoming a better software engineer. Concurrent programming is especially interesting. In the past few months I have encountered various blogs, podcasts where it is frequently said that no self respecting programmer can claim that he can get concurrency right (for all the cases) it’s a very hard problem, and people who think they know how to do it have no real idea what they are in for.
Fault tolerance is some thing which is very crucial in any highly dependeable systems. There was another course being offered with the title of Software Engineering using Formal methods, but I decided to not take it as it deals with lots of formal theories and I have a feeling that it won’t be much of a use for me (being on the practical side) I will howere try to attend a few lectures of that course (regarding concurrency modelling).
Leave the first comment ▶
It’s been ages since I have even logged into my blog , let alone SVN update it. Signs of the busy time. Well I am back in Sweden after 3 months of roaming around (which included a trip back home, a short stay in Germany and work trip in Belgium for 6 weeks). I am glad that I don’t have to leave my room for a new one for at least next four months.
While in Abbottabad, I linked up my Mom’s Sony Bravia TV with a 35Euro second hand Pentium 4 box and a 14 Euro A4Tech camera(with builtin microphone). After installing DynDNS client, OpenVPN, Skype and Vino server on Ubuntu 9.04, I have my self a remote box which I can use for video conference. Since I am a big fan of Star Trek (especially DS9) I would like to have a linux distribution, whose sole purpose is to serve as a video communication terminal. What I fail to understand is why isn’t this technology (builtin cameras and mics in tv with internet connectivity) already built into TV screens.
I will post more details of my setup on the blog later, first I need to find an easy to use SIP/Video call client which can take calls automatically and show video in full screen.
Leave the first comment ▶