Izmantojot MySQL Performance Tuning Analyzer Script

Izmantojot MySQL Performance Tuning Analyzer Script
Izmantojot MySQL Performance Tuning Analyzer Script
Anonim

Kad jūs strādājat pie sava vietnes ātruma palielināšanas, ļoti svarīgs gabals nodrošina, ka jūs saņemat katru pēdējo veiktspējas kritumu no sava datu bāzes servera. Diemžēl lielākajai daļai no mums, kas parasti nav datu bāzes administratori, tas var būt sarežģīts priekšmets.

Pastāv virkne veiktspējas tunešanas skriptu, kas analizēs jūsu servera iestatījumus un pašreizējo statusu un sniegs informāciju par ieteicamajām izmaiņām, kas jums jāveic. Jums ne vienmēr ir jāievēro visi ieteikumi, bet tas ir vērts aplūkot jebkurā gadījumā.

Skripts, ko izmantoju, sniedz jums ieteikumus par sekojošo:

  • Lēnais vaicājumu žurnāls
  • Max Connections

  • Darbinieku pavedieni
  • Atslēgu buferis

  • Vaicājuma kešatmiņa
  • Kārtot buferšķīdumu

  • Pievienojas
  • Temp tabulas

  • Tabula (Open & Definition) Kešatmiņa
  • Tabulas bloķēšana

  • Tabulu skenēšana (read_buffer)
  • Innodb statuss

Kad būsit lejupielādējis skriptu, jums tas būs jāizpilda ar šādu komandu:

chmod u+x tuning-primer.sh

Ja jūs palaidat šo skriptu kā parasto lietotāju, tas lūgs jums paroli, tāpēc jums būs jānodrošina, lai attiecīgi iestatītu piekļuvi. Ja palaižat to kā root, Plesk saņems mysql paroli, ja jums tā būs instalēta.

Esmu izgriezusi daudz izejas, kuram bija daudz vairāk ieteikumu, taču tas bija pārāk garš, lai tas atbilstu lapai.

./tuning-primer.sh

- MYSQL PERFORMANCE TUNING PRIMER - – By: Matthew Montgomery –

MySQL Version 4.1.20 i686

Uptime = 5 days 10 hrs 46 min 5 sec Avg. qps = 4 Total Questions = 2020809 Threads Connected = 1

Server has been running for over 48hrs. It should be safe to follow these recommendations

---– snipped ----–

QUERY CACHE Query cache is enabled Current query_cache_size = 8 M Current query_cache_used = 7 M Current query_cach_limit = 1 M Current Query cache fill ratio = 89.38 % However, 254246 queries have been removed from the query cache due to lack of memory Perhaps you should raise query_cache_size MySQL won’t cache query results that are larger than query_cache_limit in size

---– snipped ----–

Šķiet, ka man ir jāpalielina vaicājuma kešatmiņa … Es iestatīju to tikai uz 8 MB, bet pārāk bieži tas tiek iztīrīts no kešatmiņas.

---– snipped ----–

TEMP TABLES Current max_heap_table_size = 16 M Current tmp_table_size = 32 M Of 35170 temp tables, 74% were created on disk Effective in-memory tmp_table_size is limited to max_heap_table_size. 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.

---– snipped ----–

Šāda veida informācija ir vienkārši nenovērtējama, kad mēģināt pielāgot jūsu vietnes veiktspēju.

Lejupielādēt MySQL Performance Tuning Primer Script

Ieteicams: