Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 May 2004 15:36:15 +0100
From:      Chris Elsworth <chris@shagged.org>
To:        Daniel Eischen <eischen@vigrid.com>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: Why is MySQL nearly twice as fast on Linux?
Message-ID:  <20040524143615.GA12869@shagged.org>
In-Reply-To: <Pine.GSO.4.10.10405241010540.1932-100000@pcnet5.pcnet.com>
References:  <40B19F2E.8010804@he.iki.fi> <Pine.GSO.4.10.10405241010540.1932-100000@pcnet5.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 24, 2004 at 10:13:36AM -0400, Daniel Eischen wrote:
> On Mon, 24 May 2004, Petri Helenius wrote:
> 
> > I changed the test to use InnoDB table type and saw 50% performance 
> > improvement.
> 
> Are you able to run the test using InnoDB under Linux also
> (just to see if Linux also gets a ~50% improvement)?

I've just done so. It doesn't make much difference.

It should be noted, by the way, that the default super-smack tests use
the query cache, which makes the numbers rather useless for testing
different table types; all you're testing is how fast MySQL can fetch
data from a cache. It won't be hitting the table at *all* after the
first few queries, and thus tabletype will make *negligible*
difference for the select-key test. I mean really, in the order of
0.0001 in the figures I quote below.

One should also note that super-smack does not drop its test table
after its done, so you need to drop it manually, or change the type,
so that your tests are testing what you want.

So, each of the smackfiles used below was changed to have sql_no_cache
in the select. The _i smackfile simply has type=innodb in the create
table statement.

Here's the numbers:

MyISAM:
root@cluestick:~/super-smack-1.2# src/super-smack smacks/select-key.smack 4 100000
Query Barrel Report for client smacker1
connect: max=0ms  min=0ms avg= 0ms from 4 clients 
Query_type      num_queries     max_time        min_time q_per_s
select_index    800000  0       0       22063.58


<drop table done here>


InnoDB:
root@cluestick:~/super-smack-1.2# src/super-smack smacks/select-key_i.smack 4 100000
Query Barrel Report for client smacker1
connect: max=0ms  min=0ms avg= 0ms from 4 clients 
Query_type      num_queries     max_time        min_time q_per_s
select_index    800000  0       0       22464.32


<drop table done here>


MyISAM:
root@cluestick:~/super-smack-1.2# src/super-smack smacks/update-select.smack 4 100000
Query Barrel Report for client smacker
connect: max=0ms  min=0ms avg= 0ms from 4 clients 
Query_type      num_queries     max_time        min_time q_per_s
select_index    400000  0       0       8296.32
update_index    400000  0       0       8296.32


<drop table done here>


InnoDB:
root@cluestick:~/super-smack-1.2# src/super-smack smacks/update-select_i.smack 4 100000
Query Barrel Report for client smacker
connect: max=0ms  min=0ms avg= 0ms from 4 clients 
Query_type      num_queries     max_time        min_time q_per_s
select_index    400000  0       0       8141.49
update_index    400000  0       0       8141.49



For what it's worth, the select-key test numbers raise to
approximately 36,000 with the query cache enabled.

-- 
Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040524143615.GA12869>