linux jmeter 执行失败日志,jmeter压测学习10-linux上执行遇到的问题 There is insufficient memory for the Java Runtime Env...

前言

在 linux 上执行jmeter 代码的时候遇到一个问题:There is insufficient memory for the Java Runtime Environment to continue.

报错内容

在 windows 先执行过 get_info.jmx,正常运行,传到 linux 上运行时遇到以下问题

[root@VM_0_2_centos ~]# jmeter -n -t get_info.jmx -l get.jtl

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed; error='Cannot allocate memory' (errno=12)

#

# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory.

# An error report file with more information is saved as:

# /root/hs_err_pid25736.log

从报错可以应该是内存不够用了,free -m 查看内存

[root@VM_0_2_centos ~]# free -m

total used free shared buff/cache available

Mem: 3789 3295 152 12 341 179

Swap: 2047 2047 0

果然 free 内存只有 152 了

解决办法

先清理掉一些不用的进程,释放一些内存出来,再次查看,大于1G,基本上没啥问题了

[root@VM_0_2_centos easymock]# free -m

total used free shared buff/cache available

Mem: 3789 2390 875 12 524 1084

Swap: 2047 1478 569

再次运行

[root@VM_0_2_centos ~]# jmeter -n -t get_info.jmx -l get.jtl

Creating summariser

Created the tree successfully using get_info.jmx

Starting the test @ Sat May 30 17:01:31 CST 2020 (1590829291939)

Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445

summary + 1 in 00:00:00 = 2.8/s Avg: 107 Min: 107 Max: 107 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0

summary + 299 in 00:00:03 = 86.8/s Avg: 29 Min: 10 Max: 224 Err: 0 (0.00%) Active: 0 Started: 3 Finished: 3

summary = 300 in 00:00:04 = 79.0/s Avg: 30 Min: 10 Max: 224 Err: 0 (0.00%)

Tidying up ... @ Sat May 30 17:01:36 CST 2020 (1590829296290)

... end of run

来源:oschina

链接:https://my.oschina.net/u/4284321/blog/4296529

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值