Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

Użytkownik


Czołem,
Mam "mały" problem z mysqlem.
Mianowicie, zżera mi 100 % CPU i 4 GB ram kilka minut po uruchomieniu.
Próbowałem edytować poniższe wartości wg. różnych how to, ale to nie podziałało, może któryś z Was miał podobny problem i go rozwiązał
key_buffer = 16M key_buffer_size = 64M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 max_connections = 200 table_cache = 60 query_cache_limit = 8M query_cache_size = 64M
mysqltunner wygląda następująco:
-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 528M (Tables: 484)
[--] Data in InnoDB tables: 480K (Tables: 6)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[!!] Total fragmented tables: 19
-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 29m 29s (107K q [60.911 qps], 3K conn, TX: 4B, RX: 44M)
[--] Reads / Writes: 70% / 30%
[--] Total buffers: 288.0M global + 2.7M per thread (200 max threads)
[OK] Maximum possible memory usage: 825.5M (16% of installed RAM)
[!!] Slow queries: 99% (107K/107K)
[OK] Highest usage of available connections: 33% (66/200)
[OK] Key buffer size / total MyISAM indexes: 64.0M/204.5M
[OK] Key buffer hit rate: 99.0% (18M cached / 176K reads)
[OK] Query cache efficiency: 66.7% (51K cached / 76K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (5 temp sorts / 7K sorts)
[!!] Joins performed without indexes: 8
[OK] Temporary tables created on disk: 1% (64 on disk / 4K total)
[OK] Thread cache hit rate: 85% (585 created / 3K connections)
[!!] Table cache hit rate: 0% (61 open / 14K opened)
[OK] Open file limit used: 7% (77/1K)
[!!] Table locks acquired immediately: 90%
[OK] InnoDB data size / buffer pool: 480.0K/128.0M
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Adjust your join queries to always utilize indexes
Increase table_cache gradually to avoid file descriptor limits
Optimize queries and/or use InnoDB to reduce lock wait
Variables to adjust:
join_buffer_size (> 128.0K, or always use indexes with joins)
table_cache (> 60)Pozdro
Offline







Podobno człowiek...;)








Spróbuj zwiększyć wartości pamięci, na ile możesz.
Jak te najbardziej wyczerpane podwoisz, to dziury w niebie nie będzie.
Offline

Użytkownik


Znajomy stwierdził, że jest to problem z I/O dlatego mysql się po prostu zatyka, zrobiłem mały test i wynik nie jest ( chyba ) najgorszy:
for i in 1 2 3; do hdparm -tT /dev/vda; done /dev/vda: Timing cached reads: 2000 MB in 2.00 seconds = 1000.26 MB/sec Timing buffered disk reads: 180 MB in 3.02 seconds = 59.52 MB/sec /dev/vda: Timing cached reads: 1662 MB in 2.00 seconds = 830.02 MB/sec Timing buffered disk reads: 182 MB in 3.02 seconds = 60.26 MB/sec /dev/vda: Timing cached reads: 1690 MB in 2.00 seconds = 845.43 MB/sec Timing buffered disk reads: 186 MB in 3.01 seconds = 61.73 MB/sec
Co sądzicie?
Offline