March 2009

First race of 2009..

It was cold (35 F), Windy (30 mph) and snowing (3 inches) for the Shamrock Shuffle 8K race yesterday…. But I was determined not to miss yet another race this year. Thx to Sri for pushing me during the race, I finished it in 51:28 minutes. Thats an average of 10:22/mile.

[Photo Credit : Kieffer]

This is how the course looked like. The road was so slushly that my feet were frozen and I couldn’t feel them till the 2nd mile.

[ I have to make fun of Sri’s new moustache 🙂 ]

HOW TO : Force expire sudo security permissions..

Ever run into a situation when you thought you had sudo rights on a machine and tried to issue the sudo command and upon finding that you don’t have them..get your name added to the sudoers list by begging the sysadmin.. and then frusrated when sudo keeps throwing an error that you are not part of the sudoers list? Hmm.. that is a long sentance :)..

To expire any cached security permissions, so that sudo is forced to check the sudoers files, issue the following command

sudo -k

Open Source Education

If you have time on your hand and want to learn something useful, head on over to Academic Earth (http://academicearth.org/) and view lectures from some of the best professors in the world..

I liked this one by Alan Blinder about the cause of the current economic crisis

 

Quote from his lecture.. NINJA (No Income, No Job [and] Asset] loans are bad 🙂

I am officially a trillionaire

Following up on my previous posting about what you can buy with a trillion dollars, I actually bid on some Zimbabwean currency on ebay.. I just received my freshly minted Zimbabwean currency and can officially say that I am a trillionaire :).. As any trillionaire would wonder.. what do I do with all this money now :)..

Lessons of the Trade : Simple way to deter web scrapers

If your website is a target of web scrapers (http://en.wikipedia.org/wiki/Screen_scraping), here’s a simple way to keep them on their toes..

Every few days (or weeks) make a small change to the web page format. The trick is to make the change in such a way so that your users do not notice it or are not annoyed by the change. Most of the simple scrapers use, screen scraping and this would confuse the hell out of them 🙂 and usually deters the most abusive ones. The smart ones would have approached you in the first place, requesting permission to scrape or get authorized for an interface.

Lessons of the trade : Troubleshooting database perfromance

If you have ever worked in an IT shop, you will know that the one thing you cannot escape from is issues related to Database performance. Now, I am no DBA in any way or fashion, but thought I should record some of the common issues and ways they have been overcome in my career so far. More for self records than trying to teach someone :).

  • Network Related
    • Check if the NIC (network interface) on the DB server has any speed mis match with the network device (most probably a switch) that it is connected to.
    • Check the latency between the application and the DB (pertains to applications connecting to DB over WAN links)
  • System Related
    • Check if a rouge process is using all the system resources.
    • Check if the disk sub system is performing optimally
      • Recommend using RAID 10 for transactional systems.
      • Don’t forget to check those batteries on the RAID controllers 🙂
    • Check if the DB is just running out of gas.
      • Long term capacity trending records come in handy here.
  • Database Related
    • Views are evil.. if created the wrong way. Esp, on data that is accessed frequently. Remember that you are now making two calls to the database. One to read the data, One to create the view.
    • Ensure your logs are not being writted ot (thx Ray for pointing out the typo) written to the same disk subsystem as your data files.
    • Indexes are good.. But only to an extent. If the size of your indexes is twice the size of your data.. you have an issue.
    • Check for invalid objects. You will be surprised how many times, people overlook this.
    • Sometimes, it helps to flush the SGA (Oracle specific). Be aware that it will slow down the response time for a while (until the cache gets populated again).
    • Avoid excessive monitoring. Esp. with tools that query the system tables quite frequently. This has a negative impact on the database performance.

Did you run into any strange situations and figured out a solution? Please feel free to add your comments below…