Продюсер

Продюсер
Рейтинг
36
Регистрация
09.11.2010

спасибо за советы, попробую!

admak:
покажите еще вывод тюнера
https://github.com/rackerhacker/MySQLTuner-perl

вот результат:

[root@92 ~]# ./mysqltuner.pl

>> MySQLTuner 1.2.0 - Major Hayden <major@mhtx.net>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password:

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.28
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated -InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 364M (Tables: 1063)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[--] Data in MEMORY tables: 1009K (Tables: 8)
[!!] Total fragmented tables: 62

-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 1h 42m 10s (140K q [22.967 qps], 9K conn, TX: 4B, RX: 39M)
[--] Reads / Writes: 87% / 13%
[--] Total buffers: 32.0M global + 1.6M per thread (151 max threads)
[OK] Maximum possible memory usage: 277.4M (54% of installed RAM)
[OK] Slow queries: 0% (0/140K)
[OK] Highest usage of available connections: 5% (8/151)
[OK] Key buffer size / total MyISAM indexes: 16.0M/138.7M
[OK] Key buffer hit rate: 98.1% (2M cached / 55K reads)
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 17K sorts)
[!!] Joins performed without indexes: 64
[OK] Temporary tables created on disk: 22% (529 on disk / 2K total)
[!!] Thread cache is disabled
[!!] Table cache hit rate: 0% (64 open / 10K opened)
[OK] Open file limit used: 11% (122/1K)
[OK] Table locks acquired immediately: 100% (166K immediate / 166K locks)

-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries
Adjust your join queries to always utilize indexes
Set thread_cache_size to 4 as a starting value
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
query_cache_size (>= 8M)
join_buffer_size (> 128.0K, or always use indexes with joins)
thread_cache_size (start at 4)
table_cache (> 64)

[root@92 ~]#

Вроде получилось отключить:

130121 17:07:55 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.28' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
130121 17:42:07 [Note] /usr/libexec/mysqld: Normal shutdown

130121 17:42:07 [Note] Event Scheduler: Purging the queue. 0 events
130121 17:42:07 InnoDB: Starting shutdown...
130121 17:42:08 InnoDB: Shutdown completed; log sequence number 1726150
130121 17:42:08 [Note] /usr/libexec/mysqld: Shutdown complete

130121 17:42:08 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
130121 17:42:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130121 17:42:09 [Warning] You need to use --log-bin to make --binlog-format work.
130121 17:42:09 [Note] Plugin 'FEDERATED' is disabled.
130121 17:42:09 [Note] Plugin 'InnoDB' is disabled.
130121 17:42:09 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130121 17:42:09 [Note] - '0.0.0.0' resolves to '0.0.0.0';
130121 17:42:09 [Note] Server socket created on IP: '0.0.0.0'.
130121 17:42:09 [Note] Event Scheduler: Loaded 0 events
130121 17:42:09 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.28' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)

Потестирую,спасибо.

Добавить ресурсов мне не проблема, но просто зачем переплачивать если можно просто отключить ненужные функции.

Himiko:
можете запустить команду:
mysql -u root -pПАРОЛЬ_ROOT_ОТ_MYSQL -e "select engine from information_schema.tables" | sort | uniq -c
Покажет, какие типы таблиц у вас используются.

2 CSV

1 engine

39 MEMORY

1094 MyISAM

17 PERFORMANCE_SCHEMA

Himiko:
Может есть смысл вообще выключить его. (skip-innodb)

отключил, перестал запускаться mysqld

130121 16:57:01 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
130121 16:58:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130121 16:58:11 [Warning] You need to use --log-bin to make --binlog-format work.
130121 16:58:11 [Note] Plugin 'FEDERATED' is disabled.
130121 16:58:11 [Note] Plugin 'InnoDB' is disabled.
130121 16:58:11 [ERROR] Unknown/unsupported storage engine: InnoDB
130121 16:58:11 [ERROR] Aborting

130121 16:58:11 [Note] /usr/libexec/mysqld: Shutdown complete

130121 16:58:11 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
130121 16:58:35 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130121 16:58:35 [Warning] You need to use --log-bin to make --binlog-format work.
130121 16:58:35 [Note] Plugin 'FEDERATED' is disabled.
130121 16:58:35 InnoDB: The InnoDB memory heap is disabled
130121 16:58:35 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130121 16:58:35 InnoDB: Compressed tables use zlib 1.2.3
130121 16:58:35 InnoDB: Using Linux native AIO
130121 16:58:35 InnoDB: Initializing buffer pool, size = 128.0M
130121 16:58:35 InnoDB: Completed initialization of buffer pool
130121 16:58:35 InnoDB: highest supported file format is Barracuda.
130121 16:58:35 InnoDB: Waiting for the background threads to start
130121 16:58:36 InnoDB: 1.1.8 started; log sequence number 1726150
130121 16:58:36 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130121 16:58:36 [Note] - '0.0.0.0' resolves to '0.0.0.0';
130121 16:58:36 [Note] Server socket created on IP: '0.0.0.0'.
130121 16:58:36 [Note] Event Scheduler: Loaded 0 events
130121 16:58:36 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.28' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
130121 17:07:53 [Note] /usr/libexec/mysqld: Normal shutdown

130121 17:07:53 [Note] Event Scheduler: Purging the queue. 0 events
130121 17:07:53 InnoDB: Starting shutdown...
130121 17:07:54 InnoDB: Shutdown completed; log sequence number 1726150
130121 17:07:54 [Note] /usr/libexec/mysqld: Shutdown complete

130121 17:07:54 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
130121 17:07:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130121 17:07:54 [Warning] You need to use --log-bin to make --binlog-format work.
130121 17:07:54 [Note] Plugin 'FEDERATED' is disabled.
130121 17:07:54 InnoDB: The InnoDB memory heap is disabled
130121 17:07:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130121 17:07:54 InnoDB: Compressed tables use zlib 1.2.3
130121 17:07:54 InnoDB: Using Linux native AIO
130121 17:07:54 InnoDB: Initializing buffer pool, size = 16.0M
130121 17:07:54 InnoDB: Completed initialization of buffer pool
130121 17:07:54 InnoDB: highest supported file format is Barracuda.
130121 17:07:54 InnoDB: Waiting for the background threads to start
130121 17:07:55 InnoDB: 1.1.8 started; log sequence number 1726150
130121 17:07:55 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130121 17:07:55 [Note] - '0.0.0.0' resolves to '0.0.0.0';
130121 17:07:55 [Note] Server socket created on IP: '0.0.0.0'.
130121 17:07:55 [Note] Event Scheduler: Loaded 0 events
130121 17:07:55 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.28' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)

на 16 мб буфер изменил, посмотрим что с этого выйдет..

остальное еще не пробывал..

Himiko:
Здесь лучше привлечь специалистов, чем на угад настраивать.

Я хочу сам во всем разобраться)

Спасибо за совет.

Вот содержимое my.cnf:

# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
#log-bin=mysql-bin

# binary logging format - mixed recommended
binlog_format=mixed

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

Да еще, nginx стоит и настроено php как cgi

Не уверен что DLE и vBulletin используют innodb, может и правда выключить?

Подскажите в какую строчку добавить или поменять в my.ini, чтобы изменить значение buffer pool

На сервере порядка 5 сайтов(в основном vBulletin), на паре из них посещаемость 500-1000 уников, имеет-ли смысл увеличивать обьем памяти?

Ставил Centos 6.*

Свободно на диске 2,5Гб из 10

Память 512 Мб

Ставилось все с панельки isp manager lite

проблемы с иредами

Что это?

Блиц снижен до 200$, остался 1 час до конца аукциона.

Снижаю блиц до 250$

Последняя ставка от BrightGuy 170 $ принята.

Всего: 86