From 2.3s to 22ms in 1 minute. Mysql index optimisation

In my little free time i developed for Tfm Group Software a small php application that read from a mysql table , made some calculation and presented a small table as result. In a cron job at every 5 minutes some data were inserted in the database. So far so good. The application was okĀ  and did it’s job . Another projects came and i forgot about it. However the data kept being inserted in the table. Several months laterĀ  i tried to load the result page . And for my surprise it loaded in 2.3 seconds. For a moment i was thinking that i did something wrong or the application was modified. Well it didn’t . In the database i had 375k rows but no indexes. The most used column was `insert_date` . So instantly i checked if i used index on it . Well i didn’t . So the quick fix came naturally:

create index a1 on tfm (insert_date);

And the page load time decreased magically from 2.3s to 22ms . This is a reminder to power of myql indexes in tfm linux or any other linux of your choice.

 

Linux kernel 3.0 is near

Linux Torvalds, has signed off the release candidate version as Linux 3.0 RC1.
What is new in it ?

  • New Microsoft Kinect driver
  • updated graphics drivers
  • cleancache support
  • optimizations for Intel and AMD processors

But mainly this new numbering will force companies to keep their products close to the latest kernels. Right now there are many companies that trumpet they support 2.6 kernel and in fact they are supporting the old 2.6.26 or worse version.

Also this move celebrates Linux entering in it’s third decade of life.

Well . I can say that i’m slightly older than linux . But not with much.

 

Svn aborted commits remains in conflict

I use svn on daily basis. everything was ok until today when a new this kind of error popped up :


root@tfm33: /Space/server/_wks/trunk# svn commit
svn: Commit failed (details follow):
svn: Aborting commit: '/Space/server/_wks/trunk/libmp3lame' remains in conflict

An no matter what i tried it stayed in conflict. doing some google-ing i found out that the fix is quite simple:


svn resolved /Space/server/_wks/trunk/libmp3lame

Linux Kernel where is going

At Linux Foundation Collaboration Summit 14 April 2010 it was a very interesting session on Q and A about linux kernel. Here are the main ideas discussed:

1) Documentation (lack of) – The documentation itself should be inside the kernel itself.

2) Need for new blood . Some of the original developers are getting old.

3) Keeping Independent thinkers is very important.

4) Fixing scheduler is around the corner. RTT will be merged into kernel.

5) Android is forking a part of kernel. There will be tries to merge codes between Google and Linux Kernel.

6) A person ( or persons ) are needed to reduce the kernel bloat ( kernel foot print )

DRBD is finally in kernel

DRBD refers to block devices designed as a building block to form high availability (HA) clusters. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based raid-1.
Today i happily found that DRBD was added to the upcoming linux kernel 2.6.33. Until now TFM could support DRBD but sometimes it got obsolete or we had lots of compilation problems because we are keeping up to date to kernel tree and DRBD was a little slow when big changes appeared in kernel.
In the next few days we will prepare and add to TFM some ready to use examples regarding DRBD.
Ralink’s RT2860 drivers and support for RT3090 PCI Wi-Fi chips were also added to the kernel. As usual around Christmas there are a lot of developments in Linux World.