如何在 Windows 中增加 JVM 运行时内存 [英] How to increase JVM Runtime Memory in windows

查看:24
本文介绍了如何在 Windows 中增加 JVM 运行时内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过命令行运行脚本,因为我正在使用下面的命令

I am trying to run the script through command line for that I am using below command

 C:apache-jmeter-4.0apache-jmeter-4.0in>jmeter -f -n -t C:apache-jmeter-4.0apache-jmeter-4.0inexamplesPost_call_24_FirstStep_10.jmx -l C:apache-jmeter-4.0apache-jmeter-4.0inexamplesCSVDATATest.csv  

但它给出了以下错误

Java HotSpot(TM) Client VM warning: INFO: os::commit_memory(0x05400000, 1073741824, 0) failed; error='The paging file is too small for this operation to complet e' (DOS error/errno=1455)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1073741824 bytes for Failed 
to commit area from 0x05400000 to 0x45400000 of length 1073741824.
# An error report file with more information is saved as:
# C:apache-jmeter-4.0apache-jmeter-4.0inhs_err_pid2076.log
 errorlevel=1 Press any key to continue . . .

推荐答案

根据你得到的错误:

页面文件太小,无法完成此操作

The paging file is too small for this operation to complete

您需要增加虚拟内存(交换文件)的大小,请参阅如何更改 Windows 8 或 Windows Server 上的虚拟内存 (pagefile.sys) 的大小2012 指南了解更多详情.

You need to increase size of virtual memory (swap file), see How to Change The Size of Virtual Memory (pagefile.sys) on Windows 8 or Windows Server 2012 guide for more details.

但是请注意,使用交换会对 JMeter 的性能产生显着的负面影响,因此如果可用物理 RAM 不足,最好考虑 分布式测试 - 即在多台主机上运行 JMeter slaves,因为你很可能无法从一台机器创建所需的负载.

However be aware that using swap will dramatically negatively impact JMeter's performance so if you're running out of available physical RAM it is better to consider Distributed Testing - i.e. run JMeter slaves on multiple hosts as most likely you won't be able to create the required load from a single machine.

参考文献:

这篇关于如何在 Windows 中增加 JVM 运行时内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆