Dram

Рейтинг
1121
Регистрация
28.06.2008

[client]

port = 3306

socket = /var/run/mysqld/mysqld.sock

[mysqld_safe]

socket = /var/run/mysqld/mysqld.sock

nice = 0

[mysqld]

#

# * Basic Settings

#

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

lc-messages-dir = /usr/share/mysql

skip-external-locking

low-priority-updates

#

# Instead of skip-networking the default is now to listen only on

# localhost which is more compatible and is not less secure.

#skip-networking

#

# * Fine Tuning

#

key_buffer_size = 256M

max_allowed_packet = 16M

tmp_table_size = 64M

max_heap_table_size = 64M

sort_buffer_size = 32M

join_buffer_size = 32M

thread_stack = 192K

thread_cache_size = 8

thread_concurrency = 8

read_buffer_size = 256K

read_rnd_buffer_size = 32M

# This replaces the startup script and checks MyISAM tables if needed

# the first time they are touched

myisam-recover-options = BACKUP

max_connections = 256

table_open_cache = 2048

table_definition_cache = 1024

#

# * Query Cache Configuration

#

#query_cache_limit = 1M

#query_cache_size = 256M

query_cache_size = 64M

log-error=/var/log/mysqld.log

slow-query-log = 1

slow-query-log-file = /var/log/mysql-slow.log

long_query_time = 3

#

# * Logging and Replication

#

# Both location gets rotated by the cronjob.

# Be aware that this log type is a performance killer.

# As of 5.1 you can enable the log at runtime!

#general_log_file = /var/log/mysql/mysql.log

#general_log = 1

#

# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.

#

# Here you can see queries with especially long duration

#log-queries-not-using-indexes

#

# The following can be used as easy to replay backup logs or for replication.

# note: if you are setting up a replication slave, see README.Debian about

# other settings you may need to change.

#server-id = 1

#log_bin = /var/log/mysql/mysql-bin.log

#expire_logs_days = 10

#max_binlog_size = 100M

#binlog_do_db = include_database_name

#binlog_ignore_db = include_database_name

#

# * InnoDB

#skip-innodb

#=== Отключение InnoDB ===

#default-storage-engine = MyISAM

#innodb=OFF

#skip-innodb

#=========================

# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.

# Read the manual for more InnoDB related options. There are many!

#

# * Security Features

#

# Read the manual, too, if you want chroot!

# chroot = /var/lib/mysql/

#

# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".

#

# ssl-ca=/etc/mysql/cacert.pem

# ssl-cert=/etc/mysql/server-cert.pem

# ssl-key=/etc/mysql/server-key.pem

[mysqldump]

quick

quote-names

max_allowed_packet = 16M

[mysql]

#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]

key_buffer = 16M

#

# * IMPORTANT: Additional settings that can override those from this file!

# The files must end with '.cnf', otherwise they'll be ignored.

#

!includedir /etc/mysql/conf.d/

---------- Добавлено 12.06.2015 в 10:53 ----------

Самый посещаемый сайт, после переноса которого и выросла нагрузка - имеет базу размером 734.814 МБ

поиск ГРЕПОМ по старому IP уже делал - в скриптах нет ничего, направленного на старый

Вот немного мунина. Обычно в будни запросов у меня до 500 в сек. Но щас выходные - траф на минимуме

png cpu-day.png
png mysql_queries-day.png
png diskstats_latency-day.png

Смарт дисков Админ смотрел 1 делом, сказал все ок. Да они были чуть медленее чем старых, но не критично

LEOnidUKG:
А если вывести atop? Что там у нас?

http://s011.radikal.ru/i317/1506/b9/1ce3550efda6.jpg

Диски на старом (нагрузки щас нет, пустой стоит)

/dev/sda:

Timing cached reads: 27610 MB in 2.00 seconds = 13822.86 MB/sec

Timing buffered disk reads: 440 MB in 3.00 seconds = 146.56 MB/sec

Диски на новом (сильно нагружен)

/dev/sda:

Timing cached reads: 1246 MB in 2.00 seconds = 622.80 MB/sec

Timing buffered disk reads: 388 MB in 3.00 seconds = 129.28 MB/sec

На старом - PHP/5.4.39

На новом - PHP Version 5.4.39

переключение на php-fm вообще не меняло картины

---------- Добавлено 12.06.2015 в 10:34 ----------

На старом сервере Server Version: Apache/2.2.22 (Debian) mod_fcgid/2.3.6 PHP/5.4.39-0+deb7u2

adm.unix:
Если CentOS:

Найдите в файле /etc/sysconfig/httpd такую строку:

HTTPD=/usr/sbin/httpd.worker

Раскомментируйте ее и перезапустите веб сервер.

Нет такой папки - у меняж Дебиан, писал выше.

---------- Добавлено 12.06.2015 в 10:29 ----------

Server Version: Apache/2.2.22 (Debian)

Server Built: Dec 23 2014 22:48:29

Current Time: Friday, 12-Jun-2015 10:28:42 MSK

Restart Time: Friday, 12-Jun-2015 10:27:07 MSK

Parent Server Generation: 0

Server uptime: 1 minute 34 seconds

Total accesses: 511 - Total Traffic: 6.4 MB

CPU Usage: u344.44 s125.06 cu0 cs0 - 499% CPU load

5.44 requests/sec - 69.9 kB/second - 12.9 kB/request

25 requests currently being processed, 9 idle workers

.W_.WWWWWWW_W_W..._._....WWWWWW.W_WWWW_..._W.W.W_W.........

LEOnidUKG:
Может просто nginx поставить проксей и всё? :)

Леня не понял - а щас у меня что Нгих делает?

Всего: 6929