Moving your WordPress blog from Apache to Cherokee in 30 minutes

In my post on VPS Hosting experiences, I had mentioned that inspite of doing server configuration tweaking, I found that load times were gradually increasing and I was experimenting with an alternative server named Cherokee.

The whole migration took less than half a day – including learning Cherokee, trying out locally and then using it in my blog. So what are the steps I followed to move to Cherokee?

I use Ubuntu 10.04 LTS as my dev system as well as on the production server – so one of the things that I am confident about is that, if something works in my dev environment, it is bound to work in the production setup, with minimal pains during deployment. So I wanted to first try out the entire setup – make sure everything is fine, and then replicate the setup on the production server.

I started by installing Cherokee from the PPA and also php5-cgi:

add-apt-repository ppa:cherokee-webserver/ppa
apt-get update
apt-get install cherokee
apt-get install php5-cgi

Continue reading Moving your WordPress blog from Apache to Cherokee in 30 minutes

VPS Hosting Experiences

So after the frustrating experiences with my shared hosting provider, I decided to move to VPS hosting once and for all. I knew that this would mean, spending more money, and having to spend more time and energy tweaking configurations and monitoring the site, I thought it will be worth the effort and price for the flexibility that I would get from it.

So sometime in late December, I made the move. After looking around and asking a few people, I finally decided to go with VPS.net. The movement from shared hosting to VPS was a breeze and I was up and running in under 2 hours. The experience with VPS.net until now has been pleasant.

Meanwhile, I am closely monitoring Google Webmaster Central and there are some very interesting observations and that is what I wanted to share here.

Google Webmaster Central data for buzypi.in
Google Webmaster Central data for buzypi.in
  • Gzipped Content
    The first observation is how, when I moved from shared hosting to VPS, the data download size reduced drastically with no significant change in the number of pages crawled per day. This is because I use GZIP encoding, while my shared host did not (when you pay for bandwidth there is no incentive to reduce the size, now is there?!)
  • Improvement in load times
    The second observation is how the time to download also reduce drastically when I moved to VPS hosting. This was expected. While my server now has only my services running, I am not sure how many umpteen other websites were being served on my shared host.
  • Server configuration tweaking
    Towards mid Jan, the load times started increasing. This is because I had a few other services hosted on the same machine and the server started thrashing. The biggest issue with most VPS providers is that they are very lenient on bandwidth and storage, but very stingy when it comes to memory. So I had 2 choices – either I upgrade my configuration and pay nearly twice the price, or I start playing with the Apache and PHP configurations and see if I can squeeze out more performance from the system. I decided to go for the latter. I cut down on the services hosted, disabled unnecessary modules, played with threads and child processes, and tweaking PHP configurations. But no matter what I did, the load times stayed up there, or worse, continued to increase and there was nothing I could think of.
    Recently a friend of mine asked me to give Cherokee a try. Cherokee is considered to be blazingly fast and very lightweight compared to Apache. So I have moved my blog to Cherokee now and hope to monitor the performance closely over the next few days.
  • Google on steroids
    Another observation is how Google suddenly decided to give my site a real test – and decided to download virtually all the pages possible in a single day – this happened a couple of days back and I am yet to discover why this happened. What I am happy about is that the load times were decent when this happened.
  • Load times and Google Ranking
    I can confirm that there is some corelation between page load times and rankings in Google. In December, when my site was taking as many as 3 seconds to load (Google said my site was slower than 94% of the sites in the world!) – some of the keywords for which my posts used to appear in the first page moved to the second or third pages. It was only in January did I see them come back to their original positions.

Overall, it has been a good experience – you learn a lot when you moved to VPS!

Google Docs, ODF and Data Portability

Consider the code below to display a line of text in HTML:


<style>
.paragraph-text {font-family: Arial; font-size: 11pt; font-weight: normal; text-decoration: none}
</style>
...
<p><span class="paragraph-text">Here is a test line</span></p>

Now let’s say, we see some developer write it this way:


<style>
.T1_1 {font-family: Arial; font-size: 11pt; font-weight: normal; text-decoration: none}
.T1_2 {font-family: Arial; font-size: 11pt; font-weight: normal; text-decoration: none}
.T1_3 {font-family: Arial; font-size: 11pt; font-weight: normal; text-decoration: none}
.T1_4 {font-family: Arial; font-size: 11pt; font-weight: normal; text-decoration: none}
.T1_5 {font-family: Arial; font-size: 11pt; font-weight: normal; text-decoration: none}
.T1_6 {font-family: Arial; font-size: 11pt; font-weight: normal; text-decoration: none}
.T1_7 {font-family: Arial; font-size: 11pt; font-weight: normal; text-decoration: none}
.T1_8 {font-family: Arial; font-size: 11pt; font-weight: normal; text-decoration: none}
.T1_9 {font-family: Arial; font-size: 11pt; font-weight: normal; text-decoration: none}
</style>
...
<p class="P1">
<span class="T1_1">Here</span>
<span class="T1_2"> </span>
<span class="T1_3">is</span>
<span class="T1_4"> </span>
<span class="T1_5">a</span>
<span class="T1_6"> </span>
<span class="T1_7">test</span>
<span class="T1_8"> </span>
<span class="T1_9">line</span>
</p>

What would you say of the quality of the markup above?

Continue reading Google Docs, ODF and Data Portability

Trip to Arsikere and Haranhalli

We had to visit Davangere for personal reasons. On the way back, we thought it would be a good idea to check a few places off from our ever going list of places to visit in Karnataka.

So what would be an ideal route to take? We decided to check out Google Maps.

After considering several options, we finally decided to take the route towards Holalkere via SH47, and then to reach Arsikere from there. We decided to visit a few Hoysala temples close to Arsikere and then get back to Bangalore.


[ad name=”blog-post-ad-wide”]

The route seems logical, but the road condition was so bad that it increased our travel time dramatically. The road condition ranged from moderately bad to very bad.

There are vast plain fields on either sides of the roads and you can see quite a few birds. There were lots of green bea eaters sitting on the electric wire which followed us all the way.

Continue reading Trip to Arsikere and Haranhalli

Trip to Mandagadde, Kuppalli, Mattur, Sakrebailu and Shimoga

After a series of trips to Coorg, it was time to visit Shimoga.

Each district in Karnataka gives you a very different experience. While Coorg is more to do with coffee estates and waterfalls, Shimoga is a blend of natural spots (bird sanctuaries/waterfalls etc) and historic/architectural places (lots of Hoysala temples). No wonder, there seems to be some co-relation between Shimoga and literature.


[ad name=”blog-post-ad-wide”]

There is very little information about Shimoga on the Internet, and we had to contact friends to get more information about what to visit and in what sequence.

After discussing on various options, we finally decided to cover south Shimoga (places around Thirthahalli first). The basic plan was to arrive in Shimoga as early as possible, and then head towards Agumbe on day 1, covering as many places on the way, and then head towards Sagar the next day and see what we can cover in that route.

Continue reading Trip to Mandagadde, Kuppalli, Mattur, Sakrebailu and Shimoga

Fun with X – hacks in Ubuntu

I have always wanted to have more control over my GUI windows so that I can control them and monitor them via commands. So when I looked around for tools to help me do that I found a couple in Ubuntu that help me do some pretty nifty stuff.

So here are a couple of quick hacks:

  • Monitoring what you do on a daily basis:
    Productivity geeks will love this! This is a script which can help you know what the active window title is and print it into a file. Just cron this script to run once a minute and you will have a pretty good picture of what you do on a daily basis. Want to know how much time you spend on Facebook? Try this script!


    printf "`date "+%D %T"`: " >> active-window-log
    active=`xprop -root | grep -P "^_NET_ACTIVE_WINDOW" | awk '{print $NF}'`
    title=`xwininfo -id $active | grep -P "^xwin"` >> active-window-log

    Try this script for a day and you will be amazed by the insights you get by looking at the output log.

  • Monitoring a terminal for changes: How many times has it so happened that you had a terminal which was running a script and you were waiting for it to complete, but then you didn’t know how long it would take before it printed the next line of output? Wouldn’t it be great if you could monitor it?

    So here is the command that you can use to monitor changes to a specific terminal:

    window_id=`xwininfo | grep "Window id" | sed -e 's/.*Window id: //g' -e 's/ .*//g'`;
    xwd -id "$window_id" > /tmp/initial;
    while true;
    do xwd -id "$window_id" > /tmp/final;
    if [ -z "`diff /tmp/initial /tmp/final`" ];
    then echo "No diff";
    else echo "Windows differ";
    rm /tmp/final /tmp/initial;
    break;
    fi;
    sleep 3;
    done

    When you run this script, your mouse pointer changes to a cross-hair. Just point and click the terminal that you want to monitor and then allow it to continue with its work. As soon as there are changes, it will print “Windows differ”. Now you can as well make it send you a mail or start playing a song!

    The cool thing about this script is, it shows how flexible Unix tooling is. The way the script works is by taking a ‘screenshot’ of the terminal every 3 seconds and comparing it with the original screenshot. If there is a change, then diff outputs something and hence becomes non-zero.

The scripts have been tested in Ubuntu. If you don’t have any of the commands, Ubuntu should prompt you to apt-get install them. Although not tested, it should work in any X based system.

A review of the Nokia 5230 (Nuron) Touchscreen Smartphone

I have been waiting for a sub 200$ smart phone which is either Linux based or Android based and can work seamlessly in Ubuntu. For some weird reason I have been extemely stingy about paying for smart phones – I really don’t see a point in shelling out 30k (Rs) for a phone, when you can buy a laptop for a similar price or a netbook for half the price. Dell Netbooks are available for as low as 300$, and there are a few android tablets such as the OlivePad being introduced for even cheaper prices. Considering this I feel it is a stretch to even pay 200$ for a phone.

So when I learnt about the Nokia 5230, I was excited. It was neither Android based nor Linux based, but I could atleast keep up with the developments in the mobile space at a cheap price. It didn’t take me long to decide to buy one.

This is the first smartphone I have owned, so needless to say I am excited about the features. All I really care about in a phone (other than the regular call/messaging features) is the browsing and PDA capabilities of the phone. I had earlier decided to go for the Nokia 5233, but it does not have GPS, and the 5230 comes with AGPS for an extra Rs. 1000/- so I decided to go for it.

Continue reading A review of the Nokia 5230 (Nuron) Touchscreen Smartphone

Trip to Mallalli falls, Abbimatta falls, Gaganachukki and Bharachukki

This is a continuation of the travelogue of my trip to Coorg. On day 1 we covered Devarakolli falls, Devaragundi falls and Matsya Teertha in Thodikana. Day 2 experiences follow.

The next day, we got up early. Since we were almost out of fuel, we decided to walk the entire distance from the homestay to Mallalli falls – we were told that it would be about 4km. It turned out to be 5.5km one way!

We started early morning at about 7am from the homestay. The path is mostly tarred – it is mostly downhill when you go. The jeep can take you almost the entire distance. There is a toll – where you pay Rs.5/- per person. This place was not even open when we crossed it. Finally as you reach the final spot you are warned about the ferociouness of the falls. A board reads, “Mallalli falls is very deep and dangerous, take care. Crocodiles are there.”

It is difficult to describe the grandeur of this falls. Slowly approaching the tip of the hill, the clean, calm water gushes down the valley for god knows how many meters to make a ferocious fall.

There is dense forest on all sides of the valley. The falls unfolds as you climb down the hill – you can’t see the whole view from any single point. There are cement steps laid out for almost half the distance. The steps are huge – it reminded me of the Chitradurga fort steps (which are actually meant for elephants). Sometimes I feel it is easier to climb in the regular paths than these – it seems to tire me easily. We saw a few frogs and snails on the way.



[ad name=”blog-post-ad-wide”]

Continue reading Trip to Mallalli falls, Abbimatta falls, Gaganachukki and Bharachukki

Trip to Devarakolli falls, Devaragundi falls, Matsya Teertha – Thodikana

This was my third visit to Coorg in 2 month’s time. When returning from our last visit to Coorg, we thought we had covered all the places – all that seemed to remain was Mallalli falls and we had planned to club it with some other set. But this thing of covering a district completely seems to be just an illusion!

Our trip as usual began early in the morning – this time we made sure the driver knew how serious we were about starting off on time. We were out of Bangalore by 5. By 8, we were hungry, unfortunately most hotels on the way were closed and as we crossed Hunsur we saw a few popular places which were full. We got into a small hotel and had some awful food – the place is not worth mentioning.

From here, we continued on the Madikeri road. Our plan was to cover Devarakolli falls, Devaragundi falls and Kalyala falls on Day 1, then go to Beedahalli and stay at Pushpagiri Homestay for the night and cover Mallalli falls, Abbimatta falls and Shivanasamudram on Day 2.

So we started heading towards Sullia taluk – the farthest point of our journey. The Madikeri-Mangalore road is nothing like the other parts of Coorg (which are filled with Coffee estates) – it is a road mostly downhill – with tall trees. There is a stream that follows the road almost all the way to Sullia taluk. You see quite a few small falls on the way.

Continue reading Trip to Devarakolli falls, Devaragundi falls, Matsya Teertha – Thodikana

Trip to Kalhatti Falls, Kemmangundi, Hebbe Falls and Mullayanagiri – Chikmagalur

It was the 5th week since the trip marathon began – the first one was when I was on a vacation – when I went around places in Dakshina Kannada – covering Pethri, and a few places around, and Someshwar.

Then it was a couple of trips to Coorg, the first one being a trip to Mandalpatti, Madikeri, Dubare and Bylakuppe followed by another trip to Coorg covering Dubare, Chelavara falls, Iruppu falls and Nagarhole National Park.


[ad name=”blog-post-ad-wide”]

This was the 4th trip in 5 consecutive weekends and the planning seemed straightforward. By this time, our routine of finding places, mapping them out and deciding the route had become fairly standardized. We went on a Qualis this time since there were more people than what an Indica could carry.

We planned to leave early in the morning by 2am from Bangalore – but the driver who seemed to have just returned from some other trip overslept and we left late. It was already 4am by the time we crossed Nelamangala and we were silently cursing the driver for the delay.

Continue reading Trip to Kalhatti Falls, Kemmangundi, Hebbe Falls and Mullayanagiri – Chikmagalur