???????load?????????·
???????????? ???????[ 2014/9/4 11:55:17 ] ?????????????
?????????????????????????????????????load ????????????:
????load1 15.25 base: 8.52??collect time:2014-08-30
??????δ???load ??????????? ????????????????????????????????????????·??
????? ??????
????CPU????????????????????????????????????CPU???????????????ζ??CPU????????????п?????????????????????????????????????????????????????????????????????????????????п??????????Ч???????CPU ????????????load??load ?????????????е???????????????????????????е?????????????????????????????????С???????????????????????????????????????????????5??????????????????????????????????????????????????????load?????
????Load Average ????????(1min??5min??15min)?????Load??????????????1??????ζ?????????????????????????CPU ????????ɡ?
????14:50:31 up 166 days?? 1:54?? 295 users?? load average: 0.05?? 0.04?? 0.00
?????? ??????
?????????MySQL??????load?????????????????????:
????1 ???????????????/????order by ?????SQL???.
????2 SQL?????к???????/??м??????/update/delete where?????????????????????????sql???.
????3 ???????????????????10????????????????????????????????????
????4 ??????????????(?????????)?????????????????(?????????????cpu????????????????load??)
????5 ????д?????? ??????writeback ??? write through
????RAID??????дcache(Battery Backed Write Cache)??дcache??IO???????????????????????????????????????????????
????????????磬????90???????????????????????????????дcache?????writeback???writethrough??????дcache???Ч???????????д?????IO???????????????о???IO?? ?????????cpu ???ж????load ???
????6 ???? ??????? ??
?????? ???????
??????Load average ??????????μ??????????????ж?????????Over Load?????????ж???CPU????????io??????????????治??
????????????????? ??????cpu??????ж?????Load????С??CPU??????????????????????????????????????????????????????У?1??2???????????????????????????(????24??)???load ????20 ?????????????????????????24??????????????DBA?????????????load ?????????????????
????a) ????????
????1 top -u mysql -c ??鵱????cpu????????????-c ???????????????????????????????????????????????load???
????2 ??????????????pid ????MySQL?????
????3 ?????MySQL ??????????laod ???????????????????
????show processlist;
????SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND <> 'sleep' AND TIME>100;
??????
????orzdba ???????????/thread active??????÷?orzdba --help
????orztop ?????鵱???????е???sql???÷?orztop -P $port
????4 ???????sql?????μ???y???????????????е???????
????a ???????????
????b ????sql ??? ??????order by ?????????????
????c ????????????棬??????????????????
????b) OS ?????? ?????IO
???????iostat ?????r/s(??????)??w/s(д????)??avgrq-sz(????????С)??await(IO???)?? svctm(IO??????)
????r/s ??w/s??????/д??????????
????util???豸??????????????????????????豸???????????(???????????豸??д????)???????????????????????????????????????????????
????svctm?????????????????????????????????(r/s+w/s)*(svctm/1000)=util????????????util?????????? svctm=1000/(r/s+w/s)??????IOPS??1000????svctm?????1?????????????????????????????????????????
????await???????????????????????????????????????????????????????£?await????svctm??????????С???????????????????????????????????????????????
????avgqu-sz???????????е?????????????????г????????á?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11