On Monday 07 May 2001 03:37, Andrew Leshkin wrote:
> Hello,
> 
> I have the following perfomance problem with simple query on one of my
> servers:
> 
> Here is my table  ~60000 records.
> 
> +-------------+---------------------+------+-----+------------+---------
> -------+
> | Field       | Type                | Null | Key | Default    | Extra
> |
> +-------------+---------------------+------+-----+------------+---------
> -------+
> | record_id   | int(11) unsigned    |      | PRI | NULL       |
> auto_increment |
> | dd          | date                |      | MUL | 0000-00-00 |
> |
> | category_id | tinyint(4) unsigned |      |     | 0          |
> |
> | type_id     | tinyint(4) unsigned |      |     | 0          |
> |
> | design      | varchar(10)         |      |     |            |
> |
> | body        | text                |      |     |            |
> |
> | indexed     | enum('Y','N')       |      | MUL | N          |
> |
> +-------------+---------------------+------+-----+------------+---------
> -------+
> 
> Here is the query :
> 
> mysql> SELECT DISTINCT dd from privatinfo_record;
> +------------+
> | dd         |
> +------------+
> | 2001-04-02 |
> | 2001-04-09 |
> | 2001-04-16 |
> | 2001-04-23 |
> | 2001-04-30 |
> +------------+
> 5 rows in set (0.15 sec)
> 
> And everything looks okay untill I'll do several this queries at the
> same time. I tested this query with the same tables on other servers
> with same MySQL configuration and version - it works ok. 
> 
> First Server cddb.infonet.ee - Linux 2.2.17 - Pentium Pro 200mhz, 198M
> RAM (NORMAL SERVER)
> Concurrency Level: 1  - Requests per second: 1.31
> Concurrency Level: 10 - Requests per second: 1.20
> 
> Second Server si.infonet.ee - Linux  2.4.2  - 2 x Pentium III 800Mhz, 1G
> RAM (BAD SERVER)
> Concurrency Level: 1  - Requests per second: 6.46
> Concurrency Level: 10 - Requests per second: 0.52
>                                              ^^^^^^^^^^^^^^^^^^^ ???

This is a known problem with unpatched LinuxThreads, and this is one reason 
we strongly encourage all Linux users to use our binary instead of building 
their own, unless they patch LinuxThreads the way we did. LinuxThreads is 
terrible when you have high concurrently and lots of short critical regions, 
which is the case with MySQL. You can read more about this at 
http://www.mysql.com/doc/L/i/Linux.html

P.S. Just something to laugh about - if you take the second CPU out of your 
fast machine, you will actually get about 6 requests per second instead of 
0.52 with 10 clients with your current binary. Almost like it says in the 
Bible, "if thine right eye (CPU) offend thee, pluck it out...".

-- 
MySQL Development Team
   __  ___     ___ ____  __ 
  /  |/  /_ __/ __/ __ \/ /   Sasha Pachev <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Provo, Utah, USA
       <___/                  

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to