I use memlock to ensure it stays in memory. More than likely it's table optimization. EXPLAIN and SHOW INDEXES will likely help you once you turn slow query logging on.
-J -----Original Message----- From: Justin Swanhart [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 3:24 PM To: [EMAIL PROTECTED] Subject: Re: MySQL eats 100% CPU on a quad CPU system... Are you swapping? Check vmstat and iostat Are your queries optimized, are they doing full table scans? Enable the slow query log. On Mon, 16 Aug 2004 14:48:35 +0200, Fahr o Mavastradioz <[EMAIL PROTECTED]> wrote: > Hello people, > > I'm currently configuring a quad CPU system as a standalone MySQL server. > The machine runs nothing except for MySQL and some trivial things like SSH > and iptables. > A second server acts as a webserver and is connected to this one though an > internal LAN connection. > Using top or ps, it shows that MySQL eats over 99% of all the available CPU. > Using slmon, it shows that indeed all 4 CPUs are fully in use. Still, it > appears to be terribly slow and I don't think MySQL should eat over 99% CPU > on a quad CPU system... > The machine runs mysqld 4.0.18 on Debian Sarge. A stripped down my.cnf is > included below (I merely removed the comments). > Could anyone tell me what can cause this problem? > > Thanks, > - Fahr > > ===my.cnf=== > [client] > port = 3306 > socket = /var/run/mysqld/mysqld.sock > > [mysqld_safe] > err-log = /var/log/mysql/mysql.err > socket = /var/run/mysqld/mysqld.sock > open_files_limit = 8192 > > [mysqld] > user = mysql > pid-file = /var/run/mysqld/mysqld.pid > socket = /var/run/mysqld/mysqld.sock > port = 3306 > basedir = /usr > datadir = /var/lib/mysql > tmpdir = /tmp > language = /usr/share/mysql/english > skip-locking > thread_stack = 128K > skip-innodb > max_connections = 500 > key_buffer = 150M > myisam_sort_buffer_size = 64M > join_buffer_size = 1M > read_buffer_size = 1M > sort_buffer_size = 1M > table_cache = 1500 > thread_cache_size = 128 > wait_timeout = 14400 > connect_timeout = 10 > max_allowed_packet = 16M > max_connect_errors = 10 > query_cache_limit = 1M > query_cache_size = 32M > query_cache_type = 1 > > [mysqldump] > quick > max_allowed_packet = 16M > > [mysql] > > [isamchk] > key_buffer = 64M > sort_buffer = 64M > read_buffer = 16M > write_buffer = 16M > ============ > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]