Vote 1

How To Disable On-Demand CPU Scaling on Linux

September 3rd, 2008

Do you know that Linux automatically scales CPU utilization depending on processing requirements? This reduces power consumption and heat. However there are situations when CPU scaling monitor cannot properly identify CPU requirements. In such cases you may want to manually stop cpu speed daemon and restart it later again if required. Here are the required commands:

Read more (81 words) »

Vote 3

How To Twitter Using IM on Linux & Windows

August 27th, 2008

Many like to twitter using IM (Instant Messenger) because it is very simple and fast to tweet and simple to get continuous updates on your topics of interest.

In the good old days Twitter used to provide IM support. You could use any Instant Messenger supporting Jabber (XMPP protocol) to connect to Twitter buddy (twitter@twitter.com) on Gooogle GTalk server and twitter to your hearts content. For several months however Twitter has stopped supporting IM. How can we satiate our twitter crush during their downtime? There is a way.

Read more (389 words) »

Vote 3

Firefox & pkill - Inseparable Friends?

August 26th, 2008

Every one in my company knows about pkill, an obscure Linux command because we use Firefox (we are 100% Linux based) as the default browser. What is the relation, you ask? The answer is simple.

Read more (159 words) »

Vote 3

One MySQL Configuration Tip That Can Dramatically Improve MySQL Performance

August 13th, 2008

I mean every word of it. I found this simple configuration tip after days of continuously looking at MySQL logs (mytop), top, slow log queries, debugging the hell out of applications, reading tons of MySQL optimization tips (and pulling my remaining hairs in frustration) on the web. Even MySQL optimization tips from MySQL doesn't mention it. And yet this single tip solved all my MySQL headaches and performance problems. Here are some of the problems I faced:

My powerful dedicated server was frequently consuming 100% of the CPU even with moderate load.
Even with tons of optimization and indexes, I found my server idle CPU going to 0%. The key resource consumer was MySQL. The worst part was that MySQL refused to serve new request as all threads were exhausted waiting (for some miracle to happen?).

Does any of that sound familiar? Then read on for the gory technical explanations and the tip.

BTW: My initial reaction to such problems was the standard one. I looked at MySQL master-master replication (this is better than the master-slave replication which WordPress.com does for its sites) to take care of the increased load. Fortunately this single configuration change made my server take at least 10 times more load than before.

Read more (590 words) »

Vote 3

How To Automatically Start Nginx & Fastcgi on Reboot on Fedora Linux

August 10th, 2008

nginx [engine x] is a high quality, light footprint (much ligher than Apache HTTPD), high performance HTTP server and mail proxy server written by Igor Sysoev. nginx is distributed under BSD license unlike its competitor Lighttpd. We are progressively transferring our sites over to nginx. Today when I had to restart the server, I realized (after few hours) with horror that we had forgot to add the script to start nginx automatically after reboot. When you want any command to execute everytime after a reboot you should add it to /etc/rc.local. The commands in rc.local are executed *after* all the other init scripts. To automatically start nginx as well as fastcgi on reboot you should add the following lines to /etc/rc.local at the end -

Read more (300 words) »

Vote 3

Nginx: How To Stop Referrer Spam With Keyword Filtering

August 8th, 2008

You can configure Nginx to stop referrer spam by checking for bad keywords like tramadol, phentermine etc. This reduces the load on your server as well as prevents filling your referrer logs with invalid entries. Here is my nginx configuration to stop referrer spam (feel free to copy it):
Read more (139 words) »

Vote 2

Nginx: How To Redirect /index.php To / To Avoid Content Duplication

August 8th, 2008

Normally any website that responds to /index.php also responds to /. This has the potential to duplicate content. So how can you re-direct /index.php to / without causing infinite loop in nginx?

Here is a simple solution:

Read more (77 words) »

Vote 2

FATAL: Module off not found. - Solution

August 4th, 2008

You may see the following error in Fedora 8 while starting / restarting the network (service network restart):

FATAL: Module off not found.

Let's see how we can fix this.

Read more (68 words) »

Vote 2

How To Get New Email Notification in Mozilla Thunderbird

July 17th, 2008

You need to install an extension the in Mozilla Thunderbird to get new email notifications. Here is the steps in details:

Read more (167 words) »

Vote 4

How To Install Windows msi Files in Linux

July 12th, 2008

In Linux wine (or crossover office if you like to pay) is used to execute Windows applications. wine normally open exe files only. However you can also use it to open msi files as follows:
Read more (47 words) »