?????????????????????3 ?? ?? ??? ????μ? Django ??????????????? Hey!Wall ??????????????罻?????е?“?”??????????罻?????????????????????????????????????????????????
?????????????????????????????????Щ?????????ú?????????????????????????и??????????? httperf ????????????????????????????????????????
????????????????
??????????????? Slicehost ???? Xen VPS ?????? 256MB ??棬???е??? Debian Etch ??????????????????????
???????????????????λ??????? Xtraordinary Hosting ???? Xen VPS?????????????????????? ADSL ??????????磬???????????????????????????????????????????????? VPS ??????????????????????????????????顣
????????????????
??????????е????????????????? VPS ???? 256MB ??棬??????????? VPS ?????????????????? ??? 16GB ???? Quad Core ???????????????????? 256MB ??????????????????????? 64 ? VPS ?????????????????? 2.4GHz??????? 9.6 GHz ?????? 64 ????? 150MHz ?? CPU ??
?????? Xen VPS ??????辺?????????????????? CPU ????????? ???????κο??е? CPU ?????????á??????????????????? VPS ?????????????? VPS ???????????? CPU ?????????ζ??????????????????? CPU ?????Щ??????????????????????? CPU ?????
??????? httperf ????????
???????и?????????????????????????????? ab (???? Apache)?? Flood ?? httperf????????? httperf ??????κ???????ɡ?
????httperf ?????????????????
????httperf --hog --server=example.com --uri=/ --timeout=10 --num-conns=200 --rate=5
??????????У??????? http://example.com/ ?????? 200 ?η??????????? 5 ?Ρ?
??????????
?????Щ???????????????????????????????????????????????“????”??????????????????????????????
???????????????????????????????????ж????????η?????? 200 ???????? 500 ???????????????????????????????????????顣???????????????  500 ??????????????
???????????????
??????????????????????????????? CPU ??÷?????????????????????????????? top ????????????????????????????? top ?????????????
????top -b -d 3 -U www-data > top.txt
??????????У?????????? www-data ?????????ν???????????????????????????????????????? -p 1?? 2?? 3 ???????? -U username ?????? 1??2 ?? 3 ?? pid???????????????ID????
???????????????????? FastCGI processes ??????е? Python 2.5 ?? Lighttpd ?????????????????????????????????????м???y????PostgreSQL?????????
??????????????????? vmstat??????? swap ????????ж??????????????????????????????????????棬???????????????????????? vmstat ??????????????μ????????????磺
????vmstat 2
??????? httperf ?????????????
????httperf ??????????? URL ???????? GET ??????????  html  ??????????????κ?y??????????????/??????public/anonymous????????????????????????????飬?????????????????????????????
????httperf ???????????????????Django ???У?饗 authentication?????? django.contrib.auth ??????????????????????? cookie ????????????  id ???????????????????????д??? cookie ???????????????????ν??е??
???????????? cookies ?????????????и????? sessionid=97d674a05b2614e98411553b28f909de ??????????? httperf ????? cookie????????? --add-header ???????磺
????httperf ... --add-header='Cookie: sessionid=97d674a05b2614e98411553b28f909den'
????С???????????? n ????????????????????????????????????????