likewater
Mon 18th Nov '02, 5:29am
I can't bear it really!
my hardware is : sun u-60 ultrasparc 450MHZ*2 512M
only for apache
sun u10 ultrasparc 450MHZ*1 512M
only for mysql
but ,mysql have some problem , it only use a little memory , vmstat shows:
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr dd f0 s0 -- in sy cs us sy id
21 0 0 1033576 266784 0 0 0 0 0 0 0 1 0 0 0 448 44823 271 54 46 0
20 0 0 1033544 266752 0 1 0 0 0 0 0 1 0 0 0 542 40052 372 56 44 0
27 0 0 1034104 267048 0 2 0 3 3 0 0 2 0 0 0 520 41178 352 58 42 0
20 0 0 1034048 266992 0 0 0 0 0 0 0 1 0 0 0 504 46160 321 53 47 0
15 0 0 1034104 267048 0 0 0 0 0 0 0 3 0 0 0 487 47116 308 54 46 0
21 0 0 1034192 267136 0 0 0 0 0 0 0 0 0 0 0 439 43349 243 56 44 0
you can see , cpu usage is 100%, many threads ware waiting for mysql !!
how to solve it???
my.cnf
........
set-variable = key_buffer=256M
set-variable = max_allowed_packet=1M
set-variable = table_cache=512
set-variable = sort_buffer=2M
set-variable = record_buffer=2M
set-variable = thread_cache=8
# Try number of CPU's*2 for thread_concurrency
set-variable = thread_concurrency=4
set-variable = myisam_sort_buffer_size=64M
server-id = 1
set-variable = max_connections =500
[isamchk]
set-variable = key_buffer=192M
set-variable = sort_buffer=192M
set-variable = read_buffer=4M
set-variable = write_buffer=4M
[myisamchk]
set-variable = key_buffer=192M
set-variable = sort_buffer=192M
set-variable = read_buffer=4M
set-variable = write_buffer=4M
.................
my hardware is : sun u-60 ultrasparc 450MHZ*2 512M
only for apache
sun u10 ultrasparc 450MHZ*1 512M
only for mysql
but ,mysql have some problem , it only use a little memory , vmstat shows:
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr dd f0 s0 -- in sy cs us sy id
21 0 0 1033576 266784 0 0 0 0 0 0 0 1 0 0 0 448 44823 271 54 46 0
20 0 0 1033544 266752 0 1 0 0 0 0 0 1 0 0 0 542 40052 372 56 44 0
27 0 0 1034104 267048 0 2 0 3 3 0 0 2 0 0 0 520 41178 352 58 42 0
20 0 0 1034048 266992 0 0 0 0 0 0 0 1 0 0 0 504 46160 321 53 47 0
15 0 0 1034104 267048 0 0 0 0 0 0 0 3 0 0 0 487 47116 308 54 46 0
21 0 0 1034192 267136 0 0 0 0 0 0 0 0 0 0 0 439 43349 243 56 44 0
you can see , cpu usage is 100%, many threads ware waiting for mysql !!
how to solve it???
my.cnf
........
set-variable = key_buffer=256M
set-variable = max_allowed_packet=1M
set-variable = table_cache=512
set-variable = sort_buffer=2M
set-variable = record_buffer=2M
set-variable = thread_cache=8
# Try number of CPU's*2 for thread_concurrency
set-variable = thread_concurrency=4
set-variable = myisam_sort_buffer_size=64M
server-id = 1
set-variable = max_connections =500
[isamchk]
set-variable = key_buffer=192M
set-variable = sort_buffer=192M
set-variable = read_buffer=4M
set-variable = write_buffer=4M
[myisamchk]
set-variable = key_buffer=192M
set-variable = sort_buffer=192M
set-variable = read_buffer=4M
set-variable = write_buffer=4M
.................