<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 431,  comments - 344,  trackbacks - 0
    ApacheBench(ab)
    服務器負載太大而影響程序效率也是很常見的,Apache服務器自帶有一個叫AB(ApacheBench)的工具,在bin目錄下。使用這個輕巧的工具我們可以對服務器進行負載測試,

    基本用法:

    ab -n 全部請求數 -c 并發數 測試url


    例:ab -n 1000 -c 50 http://www.abc.com/a.php

    得到結果類似于(后面顏色字為中文翻譯):

    Server Software:        Apache/2.0.55
    Server Hostname:        localhost
    Server Port:            80

    Document Path:          /1.php
    Document Length:        82522 bytes  #請求文檔大小

    Concurrency Level:      50           #并發數  
    Time taken for tests:   92.76140 seconds #全部請求完成耗時
    Complete requests:      10000          #全部請求數
    Failed requests:        1974           #失敗的請求
      (Connect: 0, Length: 1974, Exceptions: 0)
    Write errors:           0
    Total transferred:      827019400 bytes #總傳輸大小
    HTML transferred:       825219400 bytes
    Requests per second:    108.61 [#/sec] (mean) #每秒請求數(平均)
    Time per request:       460.381 [ms] (mean) #每次并發請求時間(所有并發)
    Time per request:       9.208 [ms] (mean, across all concurrent requests)  #每一請求時間(并發平均)  
    Transfer rate:          8771.39 [Kbytes/sec] received #傳輸速率

    Connection Times (ms) #連接時間
                 min  mean[+/-sd] median   max
    Connect(#連接):        0    0   2.1      0      46
    Processing(#處理):    31  458  94.7    438    1078
    Waiting(#等待):       15  437  87.5    422     938
    Total:         31  458  94.7    438    1078


    其它參數:

    -n requests     全部請求數
    -c concurrency  并發數
    -t timelimit    最傳等待回應時間
    -p postfile     POST數據文件
    -T content-type POST Content-type
    -v verbosity    How much troubleshooting info to print
    -w              Print out results in HTML tables
    -i              Use HEAD instead of GET
    -x attributes   String to insert as table attributes
    -y attributes   String to insert as tr attributes
    -z attributes   String to insert as td or th attributes
    -C attribute    加入cookie, eg. 'Apache=1234. (repeatable)
    -H attribute    加入http頭, eg. 'Accept-Encoding: gzip'
                    Inserted after all normal header lines. (repeatable)
    -A attribute    http驗證,分隔傳遞用戶名及密碼
    -P attribute    Add Basic Proxy Authentication, the attributes
                    are a colon separated username and password.
    -X proxy:port   代理服務器
    -V              查看ab版本
    -k              Use HTTP KeepAlive feature
    -d              Do not show percentiles served table.
    -S              Do not show confidence estimators and warnings.
    -g filename     Output collected data to gnuplot format file.
    -e filename     Output CSV file with percentages served
    -h              Display usage information (this message)


    About eAccelerator
    eAccelerator是一個的免費、開源的PHP模塊,它能夠為提供PHP加速、優化、加碼、和動態內容緩存功能。它通過存儲PH腳本編譯后的狀態而加快執行PHP腳本的速度,而不需要頻繁的編譯這個PHP腳本。而且它能優化PHP腳本,以提高執行PHP的速度。eAccelerator特色是減少了服務器負載、使PHP腳本加速1-10倍。
    對應你的php版本下載相應的dll文件.如果是PHP 5.2.5請下載eAccelerator 0952 for PHP 5.2.5 eLoader 0952 for PHP 5.2.5

    Attachment Size
    eAccelerator 095 Final for PHP 5.1.6 120 KB
    095_final_useful _files.zip 41.97 KB
    eAccelerator 0.9.5 Final for PHP 5.1.5 120 KB
    eAccelerator 095 Final for PHP 5.1.6 Optimized for Size 108 KB
    eAccelerator 095 Final for PHP 5.2.0 120 KB
    eAccelerator 095 Final for PHP 5.0.5 120 KB
    eAccelerator 095 for PHP 5.0.4 (OLDER PHP VERSION) 120 KB
    eAccelerator 0951 for PHP 5.2.2 120 KB
    eAccelerator 0951 for PHP 5.2.1 120 KB
    eAccelerator 0951 for PHP 5.2.2 Built with VC2005 SP1 128 KB
    eAccelerator 0951 for PHP 5.1.4 120 KB
    eAccelerator 0951 for PHP 5.2.3 120 KB
    eAccelerator 0951 for PHP 5.2.0 (OLDER PHP VERSION) 120 KB
    eAccelerator 0951 for PHP 5.2.4 120 KB
    eLoader 0951 for PHP 5.2.4 28 KB
    0952_final_useful _files.zip 42.27 KB
    eLoader 0952 for PHP 5.2.3 28 KB
    eAccelerator 0952 for PHP 5.2.3 120 KB
    eLoader0952_5.2.4.dll 28 KB
    eAccelerator 0952 for PHP 5.2.4 120 KB
    eAccelerator 0952 for PHP 5.2.5 120 KB
    eLoader 0952 for PHP 5.2.5 28 KB


    We have been using this PHP accelerator (0.9.5), on multiple servers, for a long time. It's used on some high traffic sites without any problem.
    Install:
    a) Download a copy of eAccelerator that is compatible with your version of PHP.
    This can be an issue with eAccelerator. Sometimes it can take a little time before the Windows binaries are available for the most recent version of PHP.
    b) Copy a compatible eaccelerator.dll to your PHP extensions folder (like:D:\php\ext replace with your actual folder location).
    Make sure the configuration directive extension_dir in your php.ini is properly pointing to your extensions folder.
    Like: extension_dir = "D:/php/ext"
    //將dll文件復制到D:/php/ext下.
    c) Create a folder (with the appropriate permissions) for the temporary cached files.
    For example: D:\temp\eaccelerator
    //創建tmp目錄 權限可寫
    d) Add the following to your php.ini (as the first loaded extension):
    .
    ;extension=php_yaz.dll
    ;extension=php_zip.dll
    //編輯php.ini 在extension=php_zip.dll之后添以紅字部分

    [eaccelerator]
    zend_extension_ts="D:\php\ext\eAccelerator0952_5.2.3.dll"
    zend_extension="D:\php\ext\eAccelerator0952_5.2.3.dll"
    eaccelerator.cache_dir = "D:\temp\eaccelerator"
    eaccelerator.shm_size="64"
    eaccelerator.enable="1"
    eaccelerator.optimizer="1"
    eaccelerator.debug ="0"
    eaccelerator.check_mtime="1"
    eaccelerator.filter=""
    eaccelerator.shm_max="0"
    eaccelerator.shm_ttl ="0"
    eaccelerator.shm_prune_period="0"
    eaccelerator.shm_only="0"
    eaccelerator.compress="1"
    eaccelerator.compress_level="9"
    eaccelerator.keys= "shm"
    eaccelerator.sessions="shm"
    eaccelerator.c
    zend_extension="D:\php\ext\eLoader0952_5.2.3.dll"
    ;;;;;;;;;;;;;;;;;;;
    ; Module Settings ;
    ;;;;;;;;;;;;;;;;;;;
    .
    .
    e) Restart your Web Server.You can see..
    posted on 2007-11-28 17:33 周銳 閱讀(975) 評論(0)  編輯  收藏 所屬分類: PHP
    主站蜘蛛池模板: 亚洲一区电影在线观看| 涩涩色中文综合亚洲| 99无码人妻一区二区三区免费| 亚洲一级大黄大色毛片| 国产在线19禁免费观看国产 | 日本高清免费中文在线看| 国产AV无码专区亚洲AV男同| 日日麻批免费40分钟日本的| 香蕉视频免费在线播放| 亚洲日本中文字幕| 国产又大又长又粗又硬的免费视频 | 亚洲免费网站观看视频| 亚洲精品乱码久久久久久中文字幕| 亚洲一区二区三区免费在线观看| 18禁亚洲深夜福利人口| 99人中文字幕亚洲区| 人人狠狠综合久久亚洲高清| 久久w5ww成w人免费| 男人扒开添女人下部免费视频 | 99re6在线精品免费观看| 亚洲国产成人无码AV在线| 亚洲AV成人片色在线观看| 四虎AV永久在线精品免费观看| 久久免费动漫品精老司机 | 97av免费视频| 一级白嫩美女毛片免费| 国产亚洲精品VA片在线播放| 亚洲欧洲免费视频| 国产亚洲老熟女视频| 成人免费无码大片A毛片抽搐 | 嫩草影院在线免费观看| 67194国产精品免费观看| 国产成人无码精品久久久久免费| 亚洲色欲色欲www在线播放| 亚洲永久中文字幕在线| 亚洲春色在线视频| 久久久久亚洲AV综合波多野结衣| 午夜成年女人毛片免费观看| 91青青青国产在观免费影视| 搡女人免费免费视频观看| 青青草国产免费国产是公开|