MySQL Forums
Forum List  »  General

Re: Very slow DELETE, UPDATE, INSERT on a new server
Posted by: Ash Urge
Date: March 23, 2009 03:22AM

But there are no problems with slow SELECT. Troubles are with DELETE, UPDATE and INSERT.
I don't think it's because of wrong queries and tables. Everything worked properly on the old server, slower one.
Problem looks like this: it works for several hours and suddenly, without any reason, gives:
# Query_time: 44.318940 Lock_time: 0.000027 Rows_sent: 0 Rows_examined: 0
SET timestamp=1237715053;
UPDATE module_userprefs SET value='xxx' WHERE modulename='timeplayed' AND setting='countedtime' AND userid='xxx';
# Query_time: 44.312592 Lock_time: 0.000032 Rows_sent: 0 Rows_examined: 0
SET timestamp=1237715053;
UPDATE ibf_sessions SET member_name='xxx',member_id='xx',member_group='xx',in_forum='x',in_topic='xxxxx',in_game='0|',in_journal='0',in_jcomment='0',login_type='0',running_time='1237715008',location='ST,,' WHERE id='xxxxxxxxx';

While these same queries are rapidly executed at other time.


SHOW TABLE STATUS FROM data LIKE 'ibf_sessions'
Name ibf_sessions
Engine MEMORY
Version 10
Row_format Fixed
Rows 4378
Avg_row_length 279
Data_length 8384600
Max_data_length 832149864
Index_length 23860880
Data_free 316386
Auto_increment NULL
Create_time NULL
Update_time NULL
Check_time NULL
Collation cp1251_general_ci
Checksum NULL
Create_options
Comment

SHOW CREATE TABLE ibf_sessions
CREATE TABLE `ibf_sessions` (
`id` varchar(32) NOT NULL DEFAULT '0',
`member_name` varchar(64) DEFAULT NULL,
`member_id` mediumint(8) NOT NULL DEFAULT '0',
`ip_address` varchar(16) DEFAULT NULL,
`browser` varchar(64) DEFAULT NULL,
`running_time` int(10) DEFAULT NULL,
`login_type` tinyint(1) DEFAULT NULL,
`location` varchar(40) DEFAULT NULL,
`member_group` smallint(3) DEFAULT NULL,
`in_forum` smallint(5) NOT NULL DEFAULT '0',
`in_topic` int(10) DEFAULT NULL,
`in_game` varchar(32) NOT NULL DEFAULT '',
`in_journal` int(10) NOT NULL DEFAULT '0',
`in_jcomment` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `in_topic` (`in_topic`),
KEY `in_forum` (`in_forum`),
KEY `running_time` (`running_time`),
KEY `ip_address` (`ip_address`)
) ENGINE=MEMORY DEFAULT CHARSET=cp1251


SAS HDD, 8 cores.
There's no high load on disks.
MySQL process itself consumpts 150-300% at hangup.


SHOW VARIABLES
auto increment increment 1
auto increment offset 1
autocommit ON
automatic sp privileges ON
back log 120
basedir /usr/local/
big tables OFF
binlog cache size 32,768
binlog format STATEMENT
bulk insert buffer size 8,388,608
character set client utf8
(Глобальное значение) cp1251
character set connection utf8
(Глобальное значение) cp1251
character set database cp1251
character set filesystem binary
character set results utf8
(Глобальное значение) cp1251
character set server cp1251
character set system utf8
character sets dir /usr/local/mysql/share/mysql/charsets/
collation connection utf8_general_ci
(Глобальное значение) cp1251_general_cs
collation database cp1251_general_cs
collation server cp1251_general_cs
completion type 0
concurrent insert 2
connect timeout 10
datadir /bd/data/
date format %Y-%m-%d
datetime format %Y-%m-%d %H:%i:%s
default week format 0
delay key write ON
delayed insert limit 100
delayed insert timeout 300
delayed queue size 1,000
div precision increment 4
engine condition pushdown ON
error count 0
event scheduler OFF
expire logs days 0
flush OFF
flush time 0
foreign key checks ON
ft boolean syntax + -><()~*:""&|
ft max word len 84
ft min word len 4
ft query expansion limit 20
ft stopword file (built-in)
general log OFF
general log file /bd/data/cl.log
group concat max len 1,024
have community features YES
have compress YES
have crypt YES
have csv YES
have dynamic loading NO
have geometry YES
have innodb YES
have ndbcluster NO
have openssl NO
have partitioning YES
have query cache YES
have rtree keys YES
have ssl NO
have symlink YES
hostname xxxx.xxx
identity 0
ignore builtin innodb OFF
init connect SET CHARACTER SET cp1251;
init file
init slave
innodb adaptive hash index ON
innodb additional mem pool size 10,485,760
innodb autoextend increment 8
innodb autoinc lock mode 1
innodb buffer pool size 134,217,728
innodb checksums ON
innodb commit concurrency 0
innodb concurrency tickets 500
innodb data file path ibdata1:10M:autoextend
innodb data home dir
innodb doublewrite ON
innodb fast shutdown 1
innodb file io threads 4
innodb file per table OFF
innodb flush log at trx commit 0
innodb flush method O_DIRECT
innodb force recovery 0
innodb lock wait timeout 50
innodb locks unsafe for binlog OFF
innodb log buffer size 5,242,880
innodb log file size 33,554,432
innodb log files in group 2
innodb log group home dir ./
innodb max dirty pages pct 90
innodb max purge lag 0
innodb mirrored log groups 1
innodb open files 300
innodb rollback on timeout OFF
innodb stats on metadata ON
innodb support xa ON
innodb sync spin loops 20
innodb table locks ON
innodb thread concurrency 8
innodb thread sleep delay 10,000
insert id 0
interactive timeout 100
join buffer size 16,777,216
keep files on create OFF
key buffer size 671,088,640
key cache age threshold 300
key cache block size 1,024
key cache division limit 100
language /usr/local/share/mysql/english/
large files support ON
large page size 0
large pages OFF
last insert id 0
lc time names en_US
license GPL
local infile OFF
locked in memory OFF
log OFF
log bin OFF
log bin trust function creators OFF
log bin trust routine creators OFF
log error /bd/data/cl.err
log output FILE
log queries not using indexes OFF
log slave updates OFF
log slow queries ON
log warnings 1
long query time 5
low priority updates ON
lower case file system OFF
lower case table names 0
max allowed packet 8,388,608
max binlog cache size 18446744073709547520
max binlog size 1,073,741,824
max connect errors 10
max connections 100
max delayed threads 20
max error count 64
max heap table size 1,073,741,824
max insert delayed threads 20
max join size 18446744073709551615
max length for sort data 1,024
max prepared stmt count 16,382
max relay log size 0
max seeks for key 18446744073709551615
max sort length 1,024
max sp recursion depth 0
max tmp tables 32
max user connections 0
max write lock count 18446744073709551615
min examined row limit 0
multi range count 256
myisam data pointer size 6
myisam max sort file size 9223372036853727232
myisam recover options OFF
myisam repair threads 1
myisam sort buffer size 67,108,864
myisam stats method nulls_unequal
myisam use mmap OFF
net buffer length 16,384
net read timeout 30
net retry count 1,000,000
net write timeout 60
new OFF
old OFF
old alter table OFF
old passwords OFF
open files limit 200,000
optimizer prune level 1
optimizer search depth 62
pid file /bd/data/cl.pid
plugin dir /usr/local/lib/mysql/plugin
port 3,306
preload buffer size 32,768
profiling OFF
profiling history size 15
protocol version 10
pseudo thread id 6,284,463
(Глобальное значение) 0
query alloc block size 8,192
query cache limit 8,388,608
query cache min res unit 4,096
query cache size 335,544,320
query cache type ON
query cache wlock invalidate OFF
query prealloc size 8,192
rand seed1
rand seed2
range alloc block size 4,096
read buffer size 8,388,608
read only OFF
read rnd buffer size 33,554,432
relay log
relay log index
relay log info file relay-log.info
relay log purge ON
relay log space limit 0
report host
report password
report port 3,306
report user
rpl recovery rank 0
secure auth OFF
secure file priv
server id 1
skip external locking ON
skip networking OFF
skip show database OFF
slave compressed protocol OFF
slave exec mode STRICT
slave load tmpdir /var/tmp/
slave net timeout 3,600
slave skip errors
slave transaction retries 10
slow launch time 2
slow query log ON
slow query log file /var/log/mysql-slow-queries.log
socket /tmp/mysql.sock
sort buffer size 33,554,432
sql auto is null ON
sql big selects ON
sql big tables OFF
sql buffer result OFF
sql log bin ON
sql log off OFF
sql log update ON
sql low priority updates ON
sql max join size 18446744073709551615
sql mode
sql notes ON
sql quote show create ON
sql safe updates OFF
sql select limit 18446744073709551615
sql slave skip counter
sql warnings OFF
ssl ca
ssl capath
ssl cert
ssl cipher
ssl key
storage engine MyISAM
sync binlog 0
sync frm ON
system time zone MSK
table definition cache 1,024
table lock wait timeout 50
table open cache 8,192
table type MyISAM
thread cache size 42
thread handling one-thread-per-connection
thread stack 262,144
time format %H:%i:%s
time zone SYSTEM
timed mutexes OFF
timestamp 1,237,797,594
tmp table size 1,073,741,824
tmpdir /var/tmp/
transaction alloc block size 8,192
transaction prealloc size 4,096
tx isolation REPEATABLE-READ
unique checks ON
updatable views with limit YES
version 5.1.32-log
version comment FreeBSD port: mysql-server-5.1.32
version compile machine amd64
version compile os portbld-freebsd7.1
wait timeout 100
warning count 0

Options: ReplyQuote


Subject
Written By
Posted
Re: Very slow DELETE, UPDATE, INSERT on a new server
March 23, 2009 03:22AM


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.