MySQL Forums
Forum List  »  Performance

Repair table - CPU remains idle
Posted by: Vijay Patel
Date: February 08, 2005 02:49AM

Hello,

While i am giving repair table command from mysql prompt, it is taking too much time for repairing.

1) While monitoring processes from "top"
it shows 97% CPU time idle.
--------Output of top---------
last pid: 4464; load averages: 0.12, 0.08, 0.02 up 1+04:08:48 00:40:08
41 processes: 1 running, 40 sleeping
CPU states: 0.0% user, 0.0% nice, 1.9% system, 0.4% interrupt, 97.7% idle
Mem: 403M Active, 1341M Inact, 152M Wired, 95M Cache, 112M Buf, 3260K Free
Swap: 4053M Total, 88K Used, 4053M Free

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
4050 mysql -4 14 423M 389M getblk 13:24 2.39% 2.39% mysqld
372 root 96 0 3440K 2232K select 0:01 0.00% 0.00% sendmail
4052 mysql 20 14 423M 389M pause 0:01 0.00% 0.00% mysqld
388 root 8 0 1356K 900K nanslp 0:00 0.00% 0.00% cron
255 root 96 0 1312K 784K select 0:00 0.00% 0.00% syslogd
330 root 96 0 1236K 688K select 0:00 0.00% 0.00% usbd
4026 mysql 107 11 423M 389M select 0:00 0.00% 0.00% mysqld
4027 mysql 107 11 423M 389M select 0:00 0.00% 0.00% mysqld
4461 root 96 0 2324K 1472K RUN 0:00 0.00% 0.00% top
4313 vijay 96 0 6092K 2372K select 0:00 0.00% 0.00% sshd
4084 vijay 96 0 6092K 2296K select 0:00 0.00% 0.00% sshd
376 smmsp 20 0 3340K 1988K pause 0:00 0.00% 0.00% sendmail
4316 root 20 0 2224K 1572K pause 0:00 0.00% 0.00% csh
4087 root 5 0 2228K 1584K ttyin 0:00 0.00% 0.00% csh
4028 mysql 20 11 423M 389M pause 0:00 0.00% 0.00% mysqld
4049 root 4 0 3300K 1808K sbwait 0:00 0.00% 0.00% mysql
3906 vijay 96 0 6092K 2288K select 0:00 0.00% 0.00% sshd
3903 root 4 0 6112K 2248K sbwait 0:00 0.00% 0.00% sshd
4310 root 4 0 6112K 2344K sbwait 0:00 0.00% 0.00% sshd
4081 root 4 0 6112K 2252K sbwait 0:00 0.00% 0.00% sshd
3909 root 20 0 2224K 1504K pause 0:00 0.00% 0.00% csh
4051 mysql 20 14 423M 389M pause 0:00 0.00% 0.00% mysqld
-------------


2) iostat -c 20 command shows heavy usage on disk.
----------------output of iostat--------
# iostat -c 20
tty ad4 cpu
tin tout KB/t tps MB/s us ni sy in id
0 4 18.22 146 2.61 0 2 3 1 94
0 128 17.29 259 4.37 0 4 3 1 92
0 43 18.90 256 4.73 0 2 5 3 90
0 43 16.79 259 4.25 0 4 4 1 92
0 43 17.09 261 4.36 0 2 6 1 91
0 43 17.36 233 3.94 0 4 2 2 93
0 43 17.23 246 4.13 0 2 4 1 93
0 43 17.08 263 4.39 0 5 3 2 90
0 43 17.49 245 4.18 0 2 2 1 95
0 43 17.49 266 4.55 0 3 2 2 94
0 43 17.43 254 4.33 0 5 4 1 91
0 43 17.99 255 4.47 0 1 4 2 93
0 43 18.26 259 4.63 0 5 3 2 89
0 43 17.97 257 4.52 0 5 3 1 91
0 43 17.41 258 4.39 0 4 2 1 93
0 43 18.18 247 4.38 0 3 4 1 92
0 43 17.12 241 4.02 0 1 4 1 95
0 43 17.74 246 4.25 0 2 6 2 89
0 43 19.32 267 5.04 0 1 5 2 92
0 43 17.91 265 4.64 0 5 4 1 90
---------------------------------


3) Server is having 2GB RAM & my.cnf is same as my-huge.cnf.
While before giving repair table, i changed these 2 variables...

set myisam_sort_buffer_size=512*1024*1024; (Prev: it was 64MB)
set read_buffer_size=10*1024*1024; (Prev: it ws 2MB)


4) my repair table command was like...
mysql> repair table data QUICK;

But it has not created any temp. table with "#" & pid.

# ls -l mydb/data.* #*
-rw-rw---- 1 mysql mysql 1453125264 Feb 7 21:25 mydb/data.MYD
-rw-rw---- 1 mysql mysql 1491445760 Feb 8 00:46 mydb/data.MYI
-rw-rw---- 1 mysql mysql 8578 Jan 28 05:29 mydb/data.frm

What is the reason for 97% Idle for CPU time. Is the system not configured properly?

Thank you,
Vijay.

Options: ReplyQuote


Subject
Views
Written By
Posted
Repair table - CPU remains idle
3888
February 08, 2005 02:49AM
2210
February 08, 2005 11:51PM
2096
February 09, 2005 01:33AM


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.