Answer the question
In order to leave comments, you need to log in
Dedicated server optimization (disk full, mysql slow). How to decide?
So, there is a web server on which there are several projects. Websites are slow at times. MySQL is weird, you can’t stop it, then it hangs tightly on the backup. In short, strange things happen. The admin suggested transferring the entire database to RAM and making a backup once an hour. Plus, he says that it's all about SATA drives, they say you need a RAID10 + SSD for the base. I'm not an admin myself, so I don't know if this solution is correct.
The config is:
2xXeon Six Core 2.40 GHz (E5645) 64Gb
DDR3 REG ECC RAM
2x2Тb HDD SATA RAID1
IPMI
# free -m
total used free shared buffers cached
Mem: 64417 63296 1121 8833 3052 44678
-/+ buffers/cache: 15564 48852
Swap: 1047 90 957
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_u9932-LogVol02
689G 64G 591G 10% /
tmpfs 32G 0 32G 0% /dev/shm
/dev/md0 20G 110M 19G 1% /boot
/dev/mapper/vg_u9932-LogVol03
435G 203G 211G 49% /home
/dev/mapper/vg_u9932-LogVol01
689G 71M 654G 1% /var/www
tmpfs 1.0G 282M 743M 28% /var/tmp
tmpfs 12G 2.6G 8 G 74% /var/mysql
atop : imgur.com/qtequQI (upd: after 4 minutes imgur.com/kZMEKzk)
top : imgur.com/wR94IFE
dstat : imgur.com/bfjkxlQ
my.cnf
[client]
port = 3306
socket = /var/lib/mysqld/mysqld.sock
default-character-set = utf8
[mysqld_safe]
nice = 0
socket = /var/lib/mysqld/mysqld.sock
[mysqld]
# Basic mysql server configuration
user = mysql
port = 3306
basedir = /usr
datadir = /var/mysql
socket = /var/lib/mysqld/mysqld.sock
skip-external-locking
default-storage-engine = innodb
pid-file = /var/run/mysqld/mysqld.pid
transaction-isolation = READ-COMMITTED
max_allowed_packet = 128M
myisam-recover = BACKUP
expire_logs_days = 10
max_binlog_size = 512M
# Cache parameters
query_cache_size = 128M
table_open_cache = 4096
thread_cache_size = 32
key_buffer = 64M
thread_stack = 512K
join_buffer_size = 16M
sort_buffer_size = 16M
# Parameters for temporary tables
tmpdir = /var/tmp
max_heap_table_size = 128M
tmp_table_size = 512M
# InnoDB parameters
innodb_file_per_table
innodb_buffer_pool_size = 128M
innodb_flush_log_at_trx_commit = 2
innodb_log_file_size = 512M
innodb_flush_method = O_DIRECT
innodb_data_home_dir = /var/mysql/
innodb_log_group_home_dir = /var/mysql/
# Database charset parameters
character-set-server = utf8
collation-server = utf8_unicode_ci
#init-connect = "SET NAMES utf8 COLLATE utf8_unicode_ci"
skip-character-set-client-handshake
skip-name-resolve
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
default-character-set = utf8
[mysql]
[isamchk]
key_buffer = 16M
Answer the question
In order to leave comments, you need to log in
fixid
RAID10 is optimal
seems to be the culprit, jbd2 is the logging process. If there is ext3-4, then you need to change the disk mount settings and half the load will be removed
mount -o remount,noatime,commit=60 /var/www
If the server is only db, why is your innodb_buffer_pool_size = 128M so low? preferably at least 50% RAM. atop it makes sense to look in the context of time, and not two listings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question