loadrunner跑場景的時候出現:Abnormal termination, caused by mdrv process termination

1.問題

loadrunner跑場景的時候出現:Abnormal termination, caused by mdrv process termination。 html

備註:我使用的是RTE協議錄製的腳本。 web

2.一些資料

2.1關於mdrv.exe意外終止的可能出現狀況說明

Hi, Users facing this mdrv process abnormal termination can try one of these options found from one of the LR articles. The Loadrunner vusers are run by a process called 'mdrv.exe'. Whenever this process encounters errors due to various reasons it may terminate. Some of the possible reasons are as follows windows

  1.     The Host machine ( Load generator) is running too many Vusers as a result of which it system resources are being maximized. ( i.e. Consistent over 90% CPU and Memory utilization). The mdrv process does not get enough resources to process the request as a result it fails
  2.     If you have Custom C coding, there is a possibility of allocated memory not being freed or memory violation errors which can lead to 'mdrv process termination'.
  3.     Replay the script with think time.
  4.     Turn off extended log when running the script in the controller.
  5.     Do not use the controller itself as the loadgenerator. i.e. have a remote LoadGenerator.
  6.     Introduce iteration pacing, if running more than one iteration each vuser.
  7.     Open the file C:\WinNT\wlrun7.ini in a text editor, modify the entry from: AgentMaxThreadsPerDriver=50 to AgentMaxThreadsPerDriver=20 or 10
  8.     Run Agent as process instead of service Launch command prompt and navigate to C:\Program Files\Mercury\Loadrunner\Launch_service\bin and run the command magentserive -remove. This will remove the agent. Now run the command magentproc -install This will install the agent as a process.
  9.     Run vusers as process instead of threads.Please go to Runtime Settings > Miscellaneous > Multithreading > RunVuser as a process.

原文地址:http://loadrunner.wetpaint.com/page/Abnormal+termination,+caused+by+mdrv+process+termination 安全

2.2 mmdrv和mdrv的異同

在LoadRunner運行腳本過程當中,在任務管理器中咱們能夠看到有一個或多個名爲「mmdrv」的進程在運行,與此同時當咱們查看 LoadRunner/bin目錄下的文件時還會看到一個「mdrv.exe」文件,那麼mmdrv.exe和mdrv.exe有什麼異同?
      其實mmdrv是mdrv的封套,mmdrv一般應用於一些協議(例如 web http/html)中對內存進行優化應用,但實質上mmdrv在優化內存時會啓動mdrv。兩者均可以按如下命令格式來啓動並運行測試腳本:            mmdrv/mdrv  -usr  <script path>
      例如在windows的command窗口中首先切換目錄至LoadRunner的bin目錄下,而後運行如下命令:
      >mmdrv -usr  D:/qa/product/Space/project/space-3.0.1/performancetest/script/firstpage/script_loadfirstpage/script_loadfirstpage.usr
      這樣腳本就會在後臺運行(不會啓動LoadRunner control界面,但能夠在任務管理器中看到mmdrv進程運行狀況),運行結果可查看腳本目錄中的日誌文件,如:output.txt,mdrv*.xxx.log(其中「*」是不一樣的字符標識,如Q6n、R5u;「xxx」是數字代碼,如22九、505)。
      mmdrv和mdrv使用的更多說明可在command窗口中LoadRunner/bin目錄下啓動mmdrv或mdrv,可看到以下說明(注意到:不管是輸入mmdrv仍是輸入mdrv,顯示的幫助窗口都是mdrv的說明內容,這更說明了mmdrv是對mdrv的包裝): 多線程

2.3 Loadrunn中的多線程與多進程

Loadrunner支持多線程環境,使用多線程的方法能使每臺負載生成器運行更多的VU,可是隻有支持線程安全的協議,才能使用Loadrunner的VU併發方式。 併發

如下協議不能支持線程併發 測試

Sybase-Dblib,Infomix,Tuxedo,and PeopleSoft-Tuxedo 優化

當使用進程併發是,在任務管理器中有mdrv.exe的進程,好比下圖,用10個VU用戶併發,就會在任務管理器中出現10個mmdrv進程 this

若是以多線程方式併發,只會出現一個mmdrv進程,一個進程能夠支持50VU的線程併發。 spa

Loadrunner的參考幫助還說明了,若是採用多線程方式併發,Load Generator將會比多進程支持更多的用戶,具體的一個VU佔用內存的取值根據Loadrunner的版本不一樣而不一樣。

3.解決方案

    根據上述的資料,首先關閉了擴展日誌,而後加入了思考時間,而且減小了單個壓力機上虛擬用戶,轉而由多個壓力機一塊兒運行腳本。此問題解決。

相關文章
相關標籤/搜索