Skocz do zawartości

sleek

Użytkownicy
  • Zawartość

    2
  • Rejestracja

  • Ostatnio

Reputacja

0 Normalna

1 obserwujący

O sleek

  • Ranga
    Nowy użytkownik
  1. Mam mysqltuner.pl i tuning- primer zainstalowany. Dostosowuje konfiguracje ale to niewiele zmienia. Zoptymalizowałem bazę za pomocą tej komendy którą podałeś. Dzięki. Jak mogę ustawić te sztywne parametry użycia ram ? Tak jeszcze dodam : To jest mój wynik z tuning- primera -- MYSQL PERFORMANCE TUNING PRIMER -- - By: Matthew Montgomery - MySQL Version 5.0.51a-24+lenny5-log x86_64 Uptime = 0 days 11 hrs 54 min 38 sec Avg. qps = 246 Total Questions = 10569051 Threads Connected = 1 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.0/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 = 5 sec. You have 2 out of 10569080 that take longer than 5 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.0/en/point-in-time-recovery.html WORKER THREADS Current thread_cache_size = 256 Current threads_cached = 26 Current threads_per_sec = 0 Historic threads_per_sec = 0 Your thread_cache_size is fine MAX CONNECTIONS Current max_connections = 200 Current threads_connected = 2 Historic max_used_connections = 28 The number of used connections is 14% of the configured maximum. Your max_connections variable seems to be fine. INNODB STATUS Current InnoDB index space = 2 M Current InnoDB data space = 2 M Current InnoDB buffer pool free = 41 % Current innodb_buffer_pool_size = 8 M Depending on how much space your innodb indexes take up it may be safe to increase this value to up to 2 / 3 of total system memory MEMORY USAGE Max Memory Ever Allocated : 402 M Configured Max Per-thread Buffers : 1.51 G Configured Max Global Buffers : 186 M Configured Max Memory Limit : 1.69 G Physical Memory : 8.00 G Max memory limit seem to be within acceptable norms KEY BUFFER Current MyISAM index space = 103 M Current key_buffer_size = 128 M Key cache miss rate is 1 : 3406 Key buffer free ratio = 72 % Your key_buffer_size seems to be fine QUERY CACHE Query cache is enabled Current query_cache_size = 48 M Current query_cache_used = 6 M Current query_cache_limit = 8 M Current Query cache Memory fill ratio = 13.36 % Current query_cache_min_res_unit = 4 K Your query_cache_size seems to be too high. Perhaps you can use these resources elsewhere MySQL won't cache query results that are larger than query_cache_limit in size SORT OPERATIONS Current sort_buffer_size = 3 M Current read_rnd_buffer_size = 256 K Sort buffer seems to be fine JOINS Current join_buffer_size = 2.00 M You have had 5 queries where a join could not use an index properly You should enable "log-queries-not-using-indexes" Then look for non indexed joins in the slow query log. If you are unable to optimize your queries you may want to increase your join_buffer_size to accommodate larger joins in one pass. Note! This script will still suggest raising the join_buffer_size when ANY joins not using indexes are found. OPEN FILES LIMIT Current open_files_limit = 2258 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_cache value = 1024 tables You have a total of 301 tables You have 345 open tables. The table_cache value seems to be fine TEMP TABLES Current max_heap_table_size = 16 M Current tmp_table_size = 16 M Of 239060 temp tables, 38% were created on disk Perhaps you should increase your tmp_table_size and/or max_heap_table_size to reduce the number of disk-based temporary tables Note! BLOB and TEXT columns are not allow in memory tables. If you are using these columns raising these values might not impact your ratio of on disk temp tables. TABLE SCANS Current read_buffer_size = 1 M Current table scan ratio = 99 : 1 read_buffer_size seems to be fine TABLE LOCKING Current Lock Wait ratio = 1 : 1115 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'. A to drugi wynik -------- General Statistics -------------------------------------------------- [--] Skipped version check for MySQLTuner script [OK] Currently running supported MySQL version 5.0.51a-24+lenny5-log [OK] Operating on 64-bit architecture -------- Storage Engine Statistics ------------------------------------------- [--] Status: +Archive -BDB +Federated +InnoDB -ISAM -NDBCluster [--] Data in MyISAM tables: 353M (Tables: 154) [--] Data in InnoDB tables: 2M (Tables: 130) [!!] Total fragmented tables: 6 -------- Security Recommendations ------------------------------------------- [OK] All database users have passwords assigned -------- Performance Metrics ------------------------------------------------- [--] Up for: 11h 58m 52s (10M q [247.160 qps], 33K conn, TX: 35B, RX: 2B) [--] Reads / Writes: 88% / 12% [--] Total buffers: 202.0M global + 7.7M per thread (200 max threads) [OK] Maximum possible memory usage: 1.7G (21% of installed RAM) [OK] Slow queries: 0% (2/10M) [OK] Highest usage of available connections: 14% (28/200) [OK] Key buffer size / total MyISAM indexes: 128.0M/103.7M [OK] Key buffer hit rate: 100.0% (3B cached / 1M reads) [OK] Query cache efficiency: 71.7% (7M cached / 10M selects) [!!] Query cache prunes per day: 2570311 [OK] Sorts requiring temporary tables: 0% (1K temp sorts / 346K sorts) [!!] Temporary tables created on disk: 38% (151K on disk / 392K total) [OK] Thread cache hit rate: 99% (28 created / 33K connections) [OK] Table cache hit rate: 42% (349 open / 822 opened) [OK] Open file limit used: 17% (391/2K) [OK] Table locks acquired immediately: 99% (4M immediate / 4M locks) [OK] InnoDB data size / buffer pool: 2.1M/8.0M -------- Recommendations ----------------------------------------------------- General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance MySQL started within last 24 hours - recommendations may be inaccurate When making adjustments, make tmp_table_size/max_heap_table_size equal Reduce your SELECT DISTINCT queries without LIMIT clauses Variables to adjust: query_cache_size (> 48M) tmp_table_size (> 16M) max_heap_table_size (> 16M) Właściwie to nie rozumiem dlaczego chce zapisywać do tmp skoro ma wolny ram w systemie z którego mogło by korzystać,
  2. Witam serdecznie, otóż posiadam portal oparty na cms Drupal. Jest on dosyć rozbudowany ( baza z tabelami Cache ma ponad 300MB. ( www.podrywaj.org tematyka trochę nietypowa ;P) Korzystam z usług server4you.net Mam opcję vSERVER Cloud Premium X4 cokolwiek to znaczy. 5,000 MHz Prozessor-Power 4,096 MB DDR-RAM / 8,192 MB FlexRAM Mam tam Debiana + lenny Często w godzinach szczytu mojego serwisu sypią się błędy, bywa tak że nie mogę się zalogować przez SSH Klienta. Przy próbie wywoływania komend potrafią się pojawić komunikaty "can't allocate memory." Mimo tego że zużycie w tym momencie wynosi np. 2GB. Właściwie nie widziałem żeby server wykorzystywał więcej niż 4 GB. Często też pojawiają się komunikaty o braku możliwości zapisania pliku. Tak jak by był jakiś limit czasowy. Testowałem różne konfiguracje jakie podsuwał mi tuning-primer. W tej chwili obecnej mam tu ustawione tak : [mysqld] set-variable=local-infile=0 # # * 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 language = /usr/share/mysql/english skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. # bind-address = 127.0.0.1 # # * Fine Tuning # key_buffer = 128M max_allowed_packet = 16M thread_stack = 128K thread_cache_size = 8 # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover = BACKUP max_connections = 100 table_cache = 850 #thread_concurrency = 10 # # * Query Cache Configuration # query_cache_limit = 1M query_cache_size = 16M # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. #log = /var/log/mysql/mysql.log # # Error logging goes to syslog. This is a Debian improvement # # Here you can see queries with especially long duration log_slow_queries = /var/log/mysql/mysql-slow.log #long_query_time = 5 #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 # # * BerkeleyDB # # Using BerkeleyDB is now discouraged as its support will cease in 5.1.12. skip-bdb # # 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! # You might want to disable InnoDB to shrink the mysqld process by circa 100MB. # skip-innodb # # * 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 # # * NDB Cluster # # See /usr/share/doc/mysql-server-*/README.Debian for more information. # # The following configuration is read by the NDB Data Nodes (ndbd processes) # not from the NDB Management Nodes (ndb_mgmd processes). # # [MYSQL_CLUSTER] # ndb-connectstring=127.0.0.1 # # * 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/ Ktoś mi podpowiedział by użyć komendy cat /proc/user_beancounters Dało to taki wynik : Version: 2.5 uid resource held maxheld barrier limit failcnt 10004485: kmemsize 51393770 71725291 71147520 79052800 280647180 lockedpages 0 439 2670 2670 291 privvmpages 520186 1268389 2097152 2306867 0 shmpages 65249 65585 131072 131072 522 dummy 0 0 9223372036854775807 9223372036854775807 0 numproc 140 223 800 800 0 physpages 349149 1123971 0 9223372036854775807 0 vmguarpages 0 0 1048576 9223372036854775807 0 oomguarpages 349329 1123995 1048576 9223372036854775807 0 numtcpsock 70 324 1800 1800 0 numflock 14 53 1000 1100 0 numpty 1 3 66 66 0 numsiginfo 0 154 1024 1024 0 tcpsndbuf 1193840 5031080 9582922 13674826 1849532731 tcprcvbuf 1012552 3595120 9582922 13674826 0 othersockbuf 209520 1657512 3194307 5922243 5313 dgramrcvbuf 0 47856 3194307 3194307 0 numothersock 126 422 1800 1800 102 dcachesize 1677474 2063683 8515584 9461760 0 numfile 4215 8000 12000 12000 605 dummy 0 0 0 0 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 numiptent 10 10 192 192 0 Testowałem również eAkcelelator PHP. Zużycie Ramu było mniejsze jednak błędy i tak występowały. Stąd też moje pytanie. Co mogę zrobić żeby uniknąć tych błędów w godzinach szczytu? Czy ten serwer wymaga jakiejś dodatkowej konfiguracji ? Proszę o porady.
×