Re: Question related to MySQL and Threads and "Context_voluntary"
While I would like to have my own octo-core Mac, I suspect that it
might be part of the problem. Do you have a Linux box on which you can
run this test?
On 7/19/07, Mariella Petrini <mariellapetrini@yahoo.com> wrote:
> The same problem happens with only MyISAM table > storage engine as well. > > The same problem occurs with 5.0.41 (32 bits compiled) > and 5.1.20 (64 bits compiled) > > > The platform is the following: > Mac Pro (MacPro2,1) > Quad-Core Intel Xeon, 3GHz and 2 processors. > Total number of cores: 8 > L2 Cache (per processor): 8 MB > Memory: 8 GB > Bus Speed: 1.33 GHz > Boot ROM Version: MP21.007F.B02 > > (Kernel: 8.10.1 Darwin Kernel Version 8.10.1: Wed May > 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 > i386 i386) > > > The high increase in number of voluntary context > switches and messages exchanged when the parallel > increases might might be a clue multicore could not be > exploited properly. > > > Thanks in advance for your help, > > Mariella > > > --- Mark Callaghan <mcallaghan@google.com> wrote: > > > As you have stated, there is no IO activity during > > your test, so the > > disk config doesn't matter. The dataset uses fewer > > than 1000 pages in > > the InnoDB buffer cache. > > > > From the iostat output, the CPU usage for system > > time is huge (24% to > > 29%) while user time is low (0% to 1%). > > > > I have benchmarks that do concurrent queries from > > multiple InnoDB > > tables on 4 CPU core servers. The tests are > > different in that they > > select all rows, so there is some network IO where > > yours only return 1 > > row. But the system time never exceeds 5% for 4, 8 > > or 16 concurrent > > clients. > > > > Do you also get high system time from queries on > > MyISAM tables? InnoDB > > had some issues (mostly fixed) with multi-core > > servers, but it > > shouldn't be this bad. I am curious if your platform > > (MacOS X) might > > be part of the problem. My tests used Linux 2.6 on > > x86. > > > > On 7/19/07, Mariella Petrini > > <mariellapetrini@yahoo.com> wrote: > > > > > > --- Mark Callaghan <mcallaghan@google.com> wrote: > > > > > > > On 7/19/07, Mariella Petrini > > > > <mariellapetrini@yahoo.com> wrote: > > > > > Hi, > > > > > > > > > > > > > > > I have been working with MySQL 5.1.20 (64 bits > > > > > compiled on Mac OS for MacPro Intel Xeon > > Quad-Core > > > > > qith 2 processors and 8GB of RAM) and MySQL > > 5.0.41 > > > > (32 > > > > > bits). > > > > > > > > Does that mean the host has 8 cores? > > > Correct > > > > > > > What is the disk configuration? > > > > > > Do you mean > > > df -k > > > Filesystem 1K-blocks Used > > Avail > > > Capacity Mounted on > > > /dev/disk1s2 488050672 157171460 > > 330623212 > > > 32% / > > > devfs 97 97 > > 0 > > > 100% /dev > > > fdesc 1 1 > > 0 > > > 100% /dev > > > <volfs> 512 512 > > 0 > > > 100% /.vol > > > /dev/disk0s2 488050672 70520 > > 487980152 > > > 0% /Volumes/NotQuiteMaxDisk > > > automount -nsl [206] 0 0 > > 0 > > > 100% /Network > > > automount -fstab [223] 0 0 > > 0 > > > 100% /automount/Servers > > > automount -static [223] 0 0 > > 0 > > > 100% /automount/static > > > > > > > > > or what type of RAID level is used ? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > While running some bnchmarks of the select > > > > statements > > > > > (independently of the storage engine used, > > either > > > > > InnoDB or MyISAM) I have noticed that > > > > > the response time of a query degrades badly > > > > (double > > > > > degrades) as soon as another query is run. > > > > > > > > Is the server IO or CPU bound during the query? > > > > vmstat and iostat will > > > > help you determine that. > > > > > > > > > > > > > > E.g. This is a case for a very simple query > > that > > > > faces > > > > > the problem. > > > > > > > > > > SELECT SQL_NO_CACHE count(DISTINCT user_id) > > as > > > > > res_count FROM t1 WHERE (acc > 0 AND cat=34 > > AND
> > > > thr > > > > > between 42 and 52) AND genre='SF'; > > > > > > > > > > Using explain > > > > > > > > > > > > > > > > > > > > +----+-------------+---------------------------+------+-------------------+---------------+---------+-------+-------+-------------+ > > > > > | id | select_type | table > > | > > > > type > > > > > | possible_keys | key | key_len > > | > > > > ref > > > > > | rows | Extra | > > > > > > > > > > > > > > > +----+-------------+---------------------------+------+-------------------+---------------+---------+-------+-------+-------------+ > > > > > | 1 | SIMPLE | t1 | ref | uag,genre_idx > > | > > > > > genre_idx | 6 | const | 61324 | Using > > where > > > > | > > > > > > > > > > > > > > > +----+-------------+---------------------------+------+-------------------+---------------+---------+-------+-------+-------------+ > > > > > > > > > > > > > > > show index from t1; > > > > > > > > > > > > > > > +---------------------------+------------+---------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+ > > > > > | Table | Non_unique | Key_name | > > > > Seq_in_index | > > > > > Column_name | Collation | Cardinality | > > > > Sub_part | > > > > > Packed | Null | Index_type | Comment | > > > > > > > > > > > > > > > +---------------------------+------------+---------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+ > > > > > | t1 | 1 | user_id_idx | > > > > 1 | > > > > > user_id | A | 178219 | > > > > NULL |
> > > > > NULL | | BTREE | |
> > > > > | t1 | 1 | uag | > > > > 1 | > > > > > acc | A | 8 | > > > > NULL |
> > > > > NULL | | BTREE | |
> > > > > | t1 | 1 | uag | > > > > 2 | > > > > > cat | A | 8 | > > > > NULL |
> > > > > NULL | | BTREE | |
> > > > > | t1 | 1 | uag | > > > > 3 | > > > > > thr | A | 538 | > > > > NULL |
> > > > > NULL | | BTREE | |
> > > > > | t1 | 1 | genre_idx | > > > > 1 | > > > > > genre | A | 6 | > > > > NULL |
> > > > > NULL | | BTREE | |
> > > > > > > > > > > > > > > +---------------------------+------------+---------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+ > > > > > > > > > > > > > > > If there is only one query running the > > response > > > > time > > > > > is x, if there two queries running at the same > > > > time > > > > > the response time of each select is > > approximately > > > > 2x, > > > > > if there 3 queries running the response time > > is > > > > > approximately 4x and if there are 4 queries > > > === message truncated === > > > > ____________________________________________________________________________________ > Luggage? GPS? Comic books? > Check out fitting gifts for grads at Yahoo! Search > http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz >
--
Mark Callaghan
mcallaghan@google.com
--
MySQL Server Benchmarks Mailing List
For list archives:
http://lists.mysql.com/benchmarks
To unsubscribe:
http://lists.mysql.com/benchmarks?unsub=lists@pantek.com
Received on Thu Jul 19 13:07:48 2007
This archive was generated by hypermail 2.1.8
: Thu Aug 09 2007 - 19:30:42 EDT
|