1.问题

loadrunner跑场景的时候出现:Abnormal termination, caused by mdrv process termination。

备注:我使用的是RTE协议录制的脚本。

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

  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”是数字代码,如229、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进程

如果以多线程方式并发,只会出现一个mmdrv进程,一个进程可以支持50VU的线程并发。

Loadrunner的参考帮助还说明了,如果采用多线程方式并发,Load Generator将会比多进程支持更多的用户,具体的一个VU占用内存的取值根据Loadrunner的版本不同而不同。

3.解决方案

根据上述的资料,首先关闭了扩展日志,然后加入了思考时间,并且减少了单个压力机上虚拟用户,转而由多个压力机一起运行脚本。此问题解决。

loadrunner跑场景的时候出现:Abnormal termination, caused by mdrv process termination的更多相关文章

  1. (Loadrunner)Abnormal termination, caused by mdrv process termination.(转)

    Load generator跑了太多用户导致CPU和内存爆满,进程无法处理请求 确认自定义的代码是否释放内存 合理调整或增加思考时间 关闭extended log 尽量避免使用Load generat ...

  2. Loadrunner 在controller中运行socket脚本时报错:Abnormal termination, caused by mdrv process termination 的原因和解决方法

    原因: 网上给出的可能的原因大致有两个: 1.  压力负载机器的资源不足(CPU,内存) 2.  分配内存和释放内存的语句不匹配. 并给出了一些解决方案,最开始我以为是加了IP地址的原因,不断尝试增加 ...

  3. loadrunner跑场景时报错Full MDB file. New error messages will be ignored

    这个原因是在controller跑场景时,controller的日志文件占用内存太大 解决办法:先找到controller的日志文件Results——Results Setting——找到日志的路径, ...

  4. LoadRunner测试场景中添加负载生成器

    如何在LoadRunner测试场景中添加负载生成器 本文对如何在LoadRunner的测试场景中添加负载生成器,如何使用负载生成器的方法,总结形成操作指导手册,以指导测试人员指导开展相关工作. 1.什 ...

  5. Abnormal build process termination IDEA启动报错

    报错如下: Error:Abnormal build process termination: "C:Program FilesJavajdk1.11.0_1injava" -Xm ...

  6. loadrunner多场景的串行执行以及定时执行

    方法一: 既然是脚本串行执行,那在场景设计中必然是要用多个脚本,要注意的是需要将Scenario Schedule中的Schedule by设置为Group的模式.然后按实际需要依次设置每个脚本的Sc ...

  7. LoadRunner 多场景批处理

    @echo off echo *********************************echo ****多场景测试*************echo ******************** ...

  8. Loadrunner:场景运行较长时间后报错:Message id [-17999] was not saved - Auto Log cache is too small to contain the message.

    loadrunner运行时间较长后,跑数据过程老是失败,有如下error: Message id [-17999] was not saved - Auto Log cache is too smal ...

  9. Loadrunner:场景中添加负载生成器

    场景中添加负载生成器: (1)远程机子(假设ip为192.168.134.23)开启负载生成器 开始菜单找到:LoadRunner Agent Process 开启后任务栏会显示如下图: (2)场景中 ...

随机推荐

  1. WP & Win10开发:实现ListView下拉加载的两种方法

    1.通过ListView控件的ContainerContentChanging方法.该方法在列表项被实例化时触发,在列表项最后一个项目实例化的时候触发刷新数据逻辑就可以实现下拉加载了. 代码如下:// ...

  2. 我从腾讯那“偷了”3000万QQ用户数据,出了份很有趣的独家报告!

    声明: 1.目前程序已停止运行!QQ空间也已升级访问安全机制. 2.本“分析”数据源自部分用户的公开信息,并未触及隐私内容,广大网友无需担心. 3.QQ空间会不定期发布大数据分析报告,感兴趣的朋友关注 ...

  3. 第六章 prototype和constructor

    首先我们看下面一段代码(第六章 01.htm) function myfun() //定义一个函数myfun { }; console.log(typeof (myfun.prototype)); c ...

  4. 备忘:SSRS技巧三则

    前言 最近在弄SSRS,发现了三个小技巧.在此记录一下.免得以后忘了. 技巧 1. SSRS输出成EXCEL时,让两个dataset各占一个sheet, 这个简单,在其中一个table的属性加上pag ...

  5. [USACO2002][poj1946]Cow Cycling(dp)

    Cow CyclingTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 2468 Accepted: 1378Description ...

  6. SequoiaDB 系列之四 :架构简析

    在本系列的第一篇中,简述了SequoiaDB的安装,以及一个(伪)集群的部署 第二篇和第三篇对SequoiaDB的集群,做了简单地操作. 在本篇中,将对SequoiaDB的架构进行简单的分析. 因为自 ...

  7. WeisEditor 3.2.1B 使用说明 [源码下载]

    WeisEditor 使用说明 1. 首先打开(Weiseditor)编辑器文件夹下js/config.js 如果此时你的项目是一个虚拟目录项目 WeisConfig.isVirtualPath = ...

  8. Javascript基础系列之(二)变量

    javascript 中变量通过var关键字(variable)来声明的. var school = "beijingyizhong" 也可以通过var 关键字给变量多个值. va ...

  9. Samba实现Linux与Window文件的传输

    Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件,由服务器及客户端程序构成.SMB(Server Messages Block,信息服务块)是一种在局域网上共享文件和打印机的一种通 ...

  10. 关于js的string的3个函数slice,substring,substr对比

    slice,substring,substr三个函数都是截取字符串,但是对参数的处理有区别 参数处理相似的两个函数式slice和substring slice(start,end)和substring ...