June 4, 2008

InnoDB Performance On 4 and 8 core CPU

I know that this was talked a lot and recently Mark Callaghan also gave a session in MySQL user conference 2008 about the real bottlenecks.

Other day I was testing my thread pool stuff with MySQL 5.1.24 + InnoDB plugin 1.0.1 along with other miscellaneous benchmark tests by making them CPU bound by keep the working set completely in memory to gauge the performance of threads overhead; and on 8-core box InnoDB seems to be doing better than 4-core. And then immediately I started few tests with mysqlslap by keeping complete data set in the buffer pool to get the proper timing on locking overhead.

Here is the comparison of performance on 8-core box with innodb_thread_concurrency is set to 32 and 0 for variable threads on 64-bit Redhat Linux 4 . The same box is used as 4-core by limiting the cores.

[read more…]

June 1, 2008

Quick Look At Dell Vostro 1310

vostro_1310_backLast Friday I received this brand new Dell Vostro 1310 laptop and it did not disappoint in anyway. I opted for this model, which is released on May 1st instead of XPS in the last minute as this is new model from DELL with completely redesigned to make it thinner and lighter than all its current models.

 

The laptop came almost fully loaded with the following spec:  

  • Dell-Vostro_g3Intel core 2 duo 2.1G
  • 3G RAM
  • 160 GB 7200 RPM hard drive
  • 13.3″ 1280×800 WXGA TrueLife glossy display
  • I ordered 6-cell battery, so the weight must be ~4.6LB

The major change in the system (even in DELL product line) includes:

  • Sleek and attractive (the first series of Vostro is really bulky and ugly looking)
  • Slot loading CD/DVD drive as that of Macbook or Macbook pro
  • Touch based Media controls
  • Touch based dedicated eject button for CD/DVD

The laptop seems to offer reasonable battery life based on the CNET lab tests (At least when I pulled the power, it shows 4:49 hours left on a fully charged battery).

The only disappoint is the keyboard; with home and end buttons are now controlled in combination with ‘fn’ key. Also, it could have been nice if the laptop had touch based mute button aside volume buttons instead of making it in keyboard (fn+delete). Even though I like normal 14″ laptops as it offers 1440X900 resolution; but DELL seems to be following the foot steps of Apple (13″ and 15″ models).

At least this is a welcome change from Dell concentrating on less expensive sleek and thinner design models in the business line of products which can attract college grades as well as home and business users.

You can find nice reviews about Vostro 1310 model from here: 

May 21, 2008

MySQL 5.1 - Thread Pool Support

Since few weeks I was working on patching the MySQL 5.1 with libevent support to have thread pooling in server end as it is needed by few properties where they do not need a persistent connection and needed to scale server with thousands of connections as each call just does a simple query execution by connecting and disconnecting and pooling seemed to be a right choice.

When I brought this idea to Monty; he pointed me to 6.0 where it is in preliminary stage. Now I took the same design and implemented in 5.1 to be compatible with how its working in 6.0; and things so far seems to be running fine, except few misc glitches that am trying to solve now.

It uses the same thread_handling=one-thread-per-connection (default) and new thread_handling=pool_of_threads and thread_pool_size controls how many will be initialized and kept at the startup.

| thread_handling            | pool-of-threads |
| thread_pool_size           | 5010            |

Few things that are missing from the 6.0 is the status of thread pools (number of threads currently in use, max used so far from pool etc) are all added now.

I am currently benchmarking the performance between the regular persistent to pool-of-threads model to see how it works out. I will post more details once I have the graphs and numbers along with working model.

May 8, 2008

Quick Look At Yahoo Messenger for Windows Vista

ymsg1 Recently Yahoo! released a new beta messenger (code name Diablo) for Windows Vista. Initially I tried during the alpha days and did not had a chance to try it again; and I installed it today during the free time and surprised to see that it offers almost all the existing features of regular messenger with much more enhancements.

The good thing about the new Diablo is;  it is completely re-written messenger on top of  Windows Presentation Foundation (WPF) for Vista to get the rich GUI look and feel. It has number of interesting features like zooming of contacts to the desired level, multiple color choice, searching of contacts, auto spell checker, phone support, call history etc. This is for sure much better than the currently existing one; and need to see what new features the team will add in the coming days especially towards the social networking of friends as part of YOS.

The only thing that I found missing is the archive of messages; that’s one of the feature that I use a lot by archiving all the messages; so that I can refer back to them at any time.

The screenshots of the messenger can be found from here:

[read more…]

Text Ads on SMS, Call To Free SMS service

Today I received a SMS message from evite for one of the birthday function. This is because my phone is configured with the evite account. The content is simple with 4 lines of text; which contains title, host, when and where. That is normal.

But I was surprised by the footer of the text message with the following line…

*Sponsored by The All-New Toyota Corolla

So, this seems to be a really cool idea; and we have to appreciate evite in order to incorporate the text ads as part of their SMS messages for evite invitations; this could generate some revenue for the company.

In India all incoming and outgoing SMS is free along with incoming calls, even though am not sure how mobile carriers are making money out there; but in USA that’s not the case even for SMS (some times its free as its part of the media packages).

Even in USA, it is possible for mobile carriers (like AT&T Cingular, Verizon and T-Mobile) to offer free SMS service to all end users by incorporating sponsored text or visual ads (if the phone can support media messages) as part of the message; that could be another adwords on Mobile SMS. Not only this offers a good revenue stream to the mobile carriers; but also can get more users to use the text or media message service as it will be free.

May 5, 2008

InnoDB not releasing a row lock?

This is a bit surprise when we encountered a case where InnoDB is not releasing its row lock when there is an error condition within the transaction. And I verified with Falcon, Oracle, SQL Server and Sybase; all seemed to work as expected.

For example; just open a transaction in a session and execute a error statement (lets say duplicate key) and on the other new session try to get a row lock on the same record (use where clause with FOR UPDATE) and you will notice that InnoDB blocks on this statement until you issue a explicit rollback or commit. But remember there is nothing happened on the first session other than duplicate error on that row. So, InnoDB should implicitly unlock the row when there is an error; and looks like it is not doing that.

Here is the scenario:

First create a single column table and populate some rows (lets say 20 rows in this case) on any version of MySQL/InnoDB.

mysql> create table t1(c1 int not null auto_increment primary key)Engine=InnoDB;
Query OK, 0 rows affected (0.14 sec)

mysql> insert into t1 values(),(),(),(),(),(),(),(),(),();
Query OK, 10 rows affected (0.12 sec)
Records: 10  Duplicates: 0  Warnings: 0

mysql> insert into t1 values(),(),(),(),(),(),(),(),(),();
Query OK, 10 rows affected (0.01 sec)
Records: 10  Duplicates: 0  Warnings: 0

and then execute the following statements; first in session-I and then in session-II and notice that session-II select statement hangs till you explicitly release the transaction in session-I.

Session-I Session-II
mysql> begin;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into t1 values(10);
ERROR 1062 (23000): Duplicate entry ‘10′ for key ‘PRIMARY’

mysql> begin;
Query OK, 0 rows affected (0.00 sec)

mysql> select * from t1 where c1=10 for update;

Even though am not really sure whether this is a bug or feature in InnoDB (I suspect this as a bug); but Oracle, SQL Server or Sybase will not block the select and releases the lock on the duplicate error. Even Falcon engine in MySQL 6.0 does seem to release the lock appropriately.

May 4, 2008

Article on InnoDB Plugin

Last week I wrote an article on InnoDB plugin, which explains how to explore all the new features in the plugin along with comparing different row formats.

The article is live now from here:
http://www.innodb.com/wp/wp-content/uploads/2008/05/venu-anuganti-article-april-29-2008.html

Thanks to Ken Jacobs, who took the initiative to post the article on the web site.

Update: here is the nicely formatted version:

http://venublog.com/exploring-new-features-in-innodb-plugin-10/