MySQL Forums
Forum List  »  Performance

Problems encountered when testing with mysqlslap
Posted by: Zhipan Wang
Date: March 25, 2013 12:50PM

Hi,

I was testing mysql server performance with mysqlslap. In the database there is a 'test' table with about 10,000 rows, and each row has a column 'id' as primary key and a column 'number' of type INT.

Command I used to do the test:

mysqlslap -h localhost -uuser -ppassword --create-schema=myschema --concurrency=64 --number-of-queries=64 --iterations=2 --query=query.sql

The problem was:
when iterations=1, it was always fine, and the result is like the following:
Benchmark
Average number of seconds to run all queries: 0.016 seconds
Minimum number of seconds to run all queries: 0.016 seconds
Maximum number of seconds to run all queries: 0.016 seconds
Number of clients running queries: 64
Average number of queries per client: 1

However, when iterations>=2, the command hangs sometimes, and even if it doesn't hang, the query duration is substantially longer. An example of the result with iterations=2 is:
Benchmark
Average number of seconds to run all queries: 0.808 seconds
Minimum number of seconds to run all queries: 0.015 seconds //my comment: first iteration?
Maximum number of seconds to run all queries: 1.602 seconds
Number of clients running queries: 64
Average number of queries per client: 1

The query (in query.sql) was simply 'SELECT * FROM test WHERE id=1000' where 1000 is a valid id. The mysql server is running on CentOS 6.3.

Did I do anything wrong in the test? or is there a likely incorrect configuration of the mysql server?

Thanks,
Zhipan



Edited 3 time(s). Last edit at 03/25/2013 12:56PM by Zhipan Wang.

Options: ReplyQuote


Subject
Views
Written By
Posted
Problems encountered when testing with mysqlslap
2000
March 25, 2013 12:50PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.