Using a MySQL Performance Tuning Analyzer Script Gamit ang isang MySQL Pagganap Tuning Analyzer Script
When you are working on increasing the speed of your website, a very important piece is making sure you get every last drop of performance out of your database server. Kapag ikaw ay nagtatrabaho sa pagtaas ng bilis ng iyong website, isang napakahalagang piraso ay siguraduhin makuha na ninyo ang bawat huling drop ng pagganap ng iyong mga database ng server. Unfortunately, for most of us that aren't normally database administrators this can be a difficult proposition. Sa kasamaang palad, para sa karamihan sa atin na hindi normal sa database administrator na ito ay maaaring maging isang mahirap na tanong.
There's a number of performance tuning scripts that will analyze your server settings and current status and give you information on recommended changes that you should make. May isang numero ng pagganap tune sa mga script na pag-aralan ang mga setting ng iyong server at kasalukuyang kalagayan at magbigay sa iyo ng impormasyon tungkol sa mga pinapayong mga pagbabago na dapat mong gawin. You shouldn't necessarily follow all of the suggestions, but it's worthwhile to take a look at anyway. Hindi kinakailangan mo dapat sundin ng lahat ng mga mungkahi, ngunit ito ay kapaki-pakinabang upang tingnan pa rin.
The script I've been using gives you recommendations for the following: Ang script ko na ang gamit ay nagbibigay sa iyo ng mga rekomendasyon para sa mga sumusunod:
Once you download the script, you'll need to make it executable with the following command: Kapag i-download ang script, kailangan mong gumawa ng mga ito maipapatupad na may mga sumusunod na command:
chmod u+x tuning-primer.sh u chmod + x tune-primer.sh
If you run this script as a regular user, it will prompt you for your password, so you'll have to make sure to set access accordingly. Kung patakbuhin mo ang script na ito bilang isang regular na mga gumagamit, ito nasain udyukan ka para sa iyong password, kaya kailangan mong siguraduhin na mag-set ng access naaayon. If you run it as root it'll pick up the mysql password from Plesk if you have that installed. Kung patakbuhin mo ito na ugat ito ay kunin ang MySQL password mula sa Plesk kung kayo ay na-install na.
I've cut out a lot of the output, which had a lot more recommendations, but was just too long to fit on the page. Ko na tanggalin ang isang pulutong ng output, na kung saan ay nagkaroon ng mas maraming mga rekomendasyon, ngunit lamang ay masyadong mahaba upang magkasya sa pahina.
./tuning-primer.sh . / tune-primer.sh
— MYSQL PERFORMANCE TUNING PRIMER – - MySQL PAGGANAP Tuning panimulang aklat --
– By: Matthew Montgomery – - By: Mateo Montgomery --MySQL Version 4.1.20 i686 MySQL 4.1.20 Version i686
Uptime = 5 days 10 hrs 46 min 5 sec Uptime = 5 araw 10 oras 46 min 5 sec
Avg. Avg. qps = 4 qps = 4
Total Questions = 2020809 Kabuuang Tanong = 2020809
Threads Connected = 1 Threads Konektado = 1Server has been running for over 48hrs. Server ay tumatakbo para sa paglipas ng 48hrs.
It should be safe to follow these recommendations Ito ay dapat maging ligtas sa mga sumusunod na mga mungkahi———– snipped ————– ---- Snipped -----
QUERY CACHE Query sa cache
Query cache is enabled Query cache ay naka-enable
Current query_cache_size = 8 M Kasalukuyang query_cache_size = 8 M
Current query_cache_used = 7 M Kasalukuyang query_cache_used = 7 M
Current query_cach_limit = 1 M Kasalukuyang query_cach_limit = 1 M
Current Query cache fill ratio = 89.38 % Kasalukuyang Query cache punan ang ratio = 89.38%
However, 254246 queries have been removed from the query cache due to lack of memory Gayunman, ang 254,246 mga tanong ay tinanggal mula sa cache ng tanong dahil sa kakulangan ng memorya
Perhaps you should raise query_cache_size Siguro dapat mong taasan query_cache_size
MySQL won't cache query results that are larger than query_cache_limit in size MySQL ay hindi cache ng query sa mga resulta na mas malaki kaysa sa query_cache_limit sa laki———– snipped ————– ---- Snipped -----
Looks like I need to Mukhang kailangan kong increase my query cache dagdagan ang aking mga tanong sa cache … I set it to only 8MB but it's cleaning out the cache far too often. ... Ako magse-set ito sa 8MB lamang ngunit ito ay paglilinis ang cache ng malayo masyadong madalas.
———– snipped ————– ---- Snipped -----
TEMP TABLES TEMP mesa
Current max_heap_table_size = 16 M Kasalukuyang max_heap_table_size = 16 M
Current tmp_table_size = 32 M Kasalukuyang tmp_table_size = 32 M
Of 35170 temp tables, 74% were created on disk Ng 35,170 mga talahanayan ng temp, 74% ay nilikha sa disk
Effective in-memory tmp_table_size is limited to max_heap_table_size. Epektibo sa-memorya tmp_table_size ay limitado sa max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size Siguro dapat mong madagdagan ang iyong tmp_table_size at / o max_heap_table_size
to reduce the number of disk-based temporary tables upang mabawasan ang bilang ng mga disk na nakabatay sa pansamantalang mesa
Note! Tandaan! BLOB and TEXT columns are not allow in memory tables. Patak at TEXT haligi ay hindi nagpapahintulot sa mga talahanayan ng memorya.
If you are using these columns raising these values might not impact your Kung ikaw ay gumagamit ng mga haligi sa pagpapalaki ng mga halagang ito ay maaring hindi magkaroon nang epekto sa iyong
ratio of on disk temp tables. ratio ng mesa sa disk temp.———– snipped ————– ---- Snipped -----
This type of information is just invaluable when you are trying to tune the performance of your website. Ang uri ng impormasyon ay napakahalaga lamang kapag ikaw ay sinusubukan upang ibagay ang performance ng iyong website.

Daily Email Updates Araw-araw na Updates Email
You can get our how-to articles in your inbox each day for free. Maaari kang makakuha ng aming kung-paano na mga artikulo sa iyong inbox sa bawat araw para sa libre. Just enter your name and email below: Ilagay lamang ang inyong pangalan at email sa ibaba:



./tuning-primer.sh: line 1164: bc: command not found . / tune-primer.sh: 1,164 linya: BC: utos hindi natagpuan
./tuning-primer.sh: line 1197: [: -gt: unary operator expected . / tune-primer.sh: 1,197 linya: [:-gt: unary operator inaasahan
./tuning-primer.sh: line 350: [: max_memoryHR: integer expression expected . / tune-primer.sh: linya ng 350: [: max_memoryHR: integer expression inaasahan
./tuning-primer.sh: line 356: [: max_memoryHR: integer expression expected . / tune-primer.sh: linya ng 356: [: max_memoryHR: integer expression inaasahan
----------- [ chopped by editor for length] ————— ----------- [Tinadtad ng editor para sa haba] -----
TABLE SCANS TALAAN Sinusuri
./tuning-primer.sh: line 331: bc: command not found . / tune-primer.sh: line 331: BC: utos hindi natagpuan
Current read_buffer_size = K Kasalukuyang read_buffer_size = K
Current table scan ratio = 7 : 1 Kasalukuyang mesa i-scan ang ratio = 7: 1
read_buffer_size seems to be fine read_buffer_size anyong pagmultahin
plese help. paki tulong.
bushido: bushido:
The problem you are having is that you are missing some of the utilities required by the script. Ang problema mo ay nagkakaroon na ikaw ay nawawala ang ilan sa mga kagamitan na kinakailangan sa pamamagitan ng script. You'll have to install the missing utilities, such as bc. Kailangan ninyong i-install ang mga nawawalang kagamitan, tulad ng BC.
Thanks for using my script Salamat sa paggamit ng aking script
If you do see any bugs or recommendations that seem ill advised please let me know. Kung mo makikita ang anumang bugs o mga rekomendasyon na tila walang pinapayuhan pakisabi sa akin. My e-mail address is found inside the script header. My e-mail address ay matatagpuan sa loob ng header ng script.
Thanks Salamat
Matt Matt
Check also MysqlTunner : Suriin din MysqlTunner:
http://rackerhacker.com/mysqltuner/ http://rackerhacker.com/mysqltuner/
Antoher good script for auto tunning your mysql server Antoher magandang script para sa auto tunning iyong MySQL server
Is there anything like this for windows users? Mayroon bang anumang tulad nito para sa mga bintana ng mga user?
I made a slight modification to the cecho function so the output can be optionally directed to a file: Ko na ginawa ng bahagyang pagbabago sa function cecho kaya output ay maaaring opsyonal itinuro sa isang file:
[ -t 1 ] && echo -e “$color” [T-1] & & echo-e "$ kulay"
echo -e “$message” echo-e "$ mensahe"
[ -t 1 ] && tput sgr0 # Reset to normal. [T-1] & & tput sgr0 # I-reset sa normal.
[ -t 1 ] && echo -e “$black” [T-1] & & echo-e "$ itim"
return bumalik
(I also changed the yellow and green settings because I can never read yellow on my xterm window.) (Ako din nagbago ang dilaw at luntiang mga setting dahil hindi ko maaaring basahin ang dilaw na sa aking xterm window.)
– seb - Seb
Anyone have a windows equivalent? Kahit sino ay may katumbas na bintana?
For anyone getting a “unexpected operator” error on startup please try changing the default shell Para sa kahit sino sa pagkuha ng isang "di inaasahang operator" error sa startup mangyaring subukan ang pagpapalit ng mga default na shell
from: mula sa:
#!/bin/sh #! / bin / SH
to: sa:
#!/bin/bash #! / bin / Bash
this fixed the problem for me on my Ubuntu 8.04 box ito naayos ang problema para sa akin sa aking kahon ng Ubuntu 8.04