mysql грузит диск сервера

12
SP
На сайте с 04.02.2009
Offline
134
#11

>>  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:
Please enter your MySQL administrative password:

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.63-0+squeeze1-log
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 74M (Tables: 61)
[!!] InnoDB is enabled but isn't being used
[!!] Total fragmented tables: 20

-------- Security Recommendations -------------------------------------------
ERROR 1142 (42000) at line 1: SELECT command denied to user ''@'localhost' for table 'user'
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 16h 38m 2s (1M q [33.143 qps], 301K conn, TX: 6B, RX: 276M)
[--] Reads / Writes: 74% / 26%
[--] Total buffers: 1.7G global + 22.5M per thread (170 max threads)
[!!] Maximum possible memory usage: 5.4G (92% of installed RAM)
[OK] Slow queries: 0% (114/1M)
[OK] Highest usage of available connections: 17% (29/170)
[OK] Key buffer size / total MyISAM indexes: 1.2G/47.4M
[OK] Key buffer hit rate: 99.9% (54M cached / 78K reads)
[OK] Query cache efficiency: 38.0% (424K cached / 1M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 227K sorts)
[OK] Temporary tables created on disk: 4% (2K on disk / 50K total)
[OK] Thread cache hit rate: 99% (29 created / 301K connections)
[!!] Table cache hit rate: 3% (1K open / 31K opened)
[OK] Open file limit used: 1% (2K/200K)
[OK] Table locks acquired immediately: 99% (1M immediate / 1M locks)

-------- Recommendations -----------------------------------------------------
General recommendations:
Add skip-innodb to MySQL configuration to disable InnoDB
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Reduce your overall MySQL memory footprint for system stability
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
table_cache (> 100000)

Вот что говорит тюнер. К примеру: [OK] Key buffer size / total MyISAM indexes: 1.2G/47.4M, выходит куда ему 1200 мб, и 100 хватит? Что ж мудреная програма не советую его уменьшить слегка?

иннодб вообше таблицы естъ?
может ее тогда отключитъ если неработает??

Затрудняюсь ответить.

Den73 Я собственно это и написал в 1 сообщении, что мой "конфиг" я настолько затюнил что он перестал работать, взял первый попавшийся с интернета и о чудо, сервер ожил. Спасибо вам за конфиг)

Собственно, тут помимо моих кривых рук, все же хостер подливает масла в огонь имхо, все тормоза происходили в будни, когда у меня сильный спад активности, с 50к человек до 35, при этом сервер нагружается сильнее, видимо соседи не дремлют. И как я понял, из-за кривых настроек, mysql сильно пользовала диск + соседи, в итоге или система уходила в своп, или просто была задержка получения данных пользователями.

Сегодня вот весь день норм, вот и статистика показывает все ок. http://clip2net.com/s/2yTLd

M
На сайте с 16.09.2009
Offline
278
#12
south_park:

Reduce your overall MySQL memory footprint for system stability

Вот, что он на самом деле вам говорит. Все остальное меркнет...

south_park:
Затрудняюсь ответить.

[!!] InnoDB is enabled but isn't being used
translate.google.com в помощь.
Абонементное сопровождение серверов (Debian) Отправить личное сообщение (), написать письмо ().
Andreyka
На сайте с 19.02.2005
Offline
822
#13

Да там все говорит об одном - требуется сисадмин.

Не стоит плодить сущности без необходимости
T
На сайте с 09.12.2011
Offline
55
tls
#14
south_park:
Собственно, тут помимо моих кривых рук, все же хостер подливает масла в огонь имхо, все тормоза происходили в будни, когда у меня сильный спад активности, с 50к человек до 35, при этом сервер нагружается сильнее, видимо соседи не дремлют. И как я понял, из-за кривых настроек, mysql сильно пользовала диск + соседи, в итоге или система уходила в своп, или просто была задержка получения данных пользователями.

Так это не железный сервер, а vps с 6-ю гигами? С этого и надо было начинать, тут все сложнее.

SP
На сайте с 04.02.2009
Offline
134
#15
Так это не железный сервер, а vps с 6-ю гигами? С этого и надо было начинать, тут все сложнее.

В 1 сообщении было написано что 6 гб.

В целом вроде все работает, но все же.

Кто готов настроить сервер и сделать несколько комментариев по поводу настройки? ваша цена?

---------- Добавлено 03.12.2012 в 15:45 ----------

        -- MYSQL PERFORMANCE TUNING PRIMER --

- By: Matthew Montgomery -

MySQL Version 5.1.63-0+squeeze1-log x86_64

Uptime = 0 days 18 hrs 11 min 34 sec
Avg. qps = 21
Total Questions = 1391869
Threads Connected = 4

Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 1.000000 sec.
You have 203 out of 1391905 that take longer than 1.000000 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.1/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 32
Current threads_cached = 27
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 170
Current threads_connected = 2
Historic max_used_connections = 30
The number of used connections is 17% of the configured maximum.
Your max_connections variable seems to be fine.

No InnoDB Support Enabled!

MEMORY USAGE
Max Memory Ever Allocated : 954 M
Configured Max Per-thread Buffers : 2.44 G
Configured Max Global Buffers : 512 M
Configured Max Memory Limit : 2.94 G
Physical Memory : 5.84 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 141 M
Current key_buffer_size = 256 M
Key cache miss rate is 1 : 517
Key buffer free ratio = 55 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is enabled
Current query_cache_size = 256 M
Current query_cache_used = 72 M
Current query_cache_limit = 2 M
Current Query cache Memory fill ratio = 28.32 %
Current query_cache_min_res_unit = 4 K
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 1 M
Current read_rnd_buffer_size = 256 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 12.00 M
You have had 335 queries where a join could not use an index properly
You have had 472 joins without keys that check for key usage after each row
join_buffer_size >= 4 M
This is not advised
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.

OPEN FILES LIMIT
Current open_files_limit = 200180 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_open_cache = 100000 tables
Current table_definition_cache = 256 tables
You have a total of 964 tables
You have 1069 open tables.
The table_cache value seems to be fine
You should probably increase your table_definition_cache value.

TEMP TABLES
Current max_heap_table_size = 128 M
Current tmp_table_size = 256 M
Of 58701 temp tables, 3% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 1 M
Current table scan ratio = 517 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 1097
You may benefit from selective use of InnoDB.
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.

Вот вывод tuning-primer.sh, он рекомендует как я понял

join_buffer_size >= 4 M

This is not advised

Не ставить больше или равно 4 мб? А mysqltuner.pl

рекомендует мне сделать больше 12 мб.

---------- Добавлено 03.12.2012 в 15:46 ----------

и по поводу

You have had 472 joins without keys that check for key usage after each row

Как такое исправить?

Andreyka
На сайте с 19.02.2005
Offline
822
#16

Я готов глянуть на сервер. Цена договорная. Контакты в профиле.

SP
На сайте с 04.02.2009
Offline
134
#17

Ну само собой договорная, вы пределы то скажите, от 20 до 50$ например, чтоб я скажем так хоть знал.

A
На сайте с 03.08.2009
Offline
121
#18

У Andreyka под настроение, может за 50 долларов monit поставить в 5 минут работы, а может что-то более умное выполнить.

[Удален]
#19
south_park:
Кто готов настроить сервер и сделать несколько комментариев по поводу настройки? ваша цена?

если диск выносят ваши соседи - то как ни настраивай - лучше не будет.

Лучьте эти деньги потратьте на переезд на нормальный выделенный сервак

Andreyka
На сайте с 19.02.2005
Offline
822
#20

Обращайтесь, договоримся

Контакты в профиле

12

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий