jmeter中的堆设置程序
heap setup program in jmeter
为什么服务器可用内存只有1.5G左右,但是在jmeter中设置HEAP为5G后,还能正常启动?
这里会发生的是系统将 in/out 内存交换到 运行 Java 程序。
它可能有效,但会对 Jmeter 的性能产生非常负面的影响。
因此,根据经验,您应该绝对避免对您的 java 程序
进行任何交换 in/out
根据 Java Performance Tuning, Profiling, and Memory Management 文章
Unless you have problems with pauses, try granting as much memory as possible to the virtual machine
Setting -Xms and -Xmx to the same value ….but be sure about the application behaviour
Be sure to increase the memory as you increase the number of processors, since allocation can be parallelized
Don’t forget to tune the Perm generation
根据Make Sense of Memory Management and Key Memory Measurements
Cached memory holds data or program code that has been fetched into memory during the current session but is no longer in use now. If necessary, the Windows memory manager will flush the contents of cached memory to make room for newly summoned data.
Free memory represents RAM that does not contain any data or program code and is free for use immediately.
Commit Charge (also called commit size) is the total amount of virtual memory that a program has touched (committed) in the current session, including memory that has been paged out of physical memory to the disk-backed page file. The Memory and Physical Memory counters on Task Manager’s Performance tab represent the sum of this value for all processes and the kernel. The Commit Charge Limit is the total amount of physical RAM and page file available—in other words, the maximum virtual memory.
因此您的系统可以比您在 Free memory
中看到的更多,因为它可以从缓存和虚拟池分配额外的页面,因此为 JMeter 提供 5 GB space 应该没问题。
但是您需要关注 JVM 堆使用情况和垃圾收集 activity(这可以使用 JVisualVM 来完成)就好像您将堆设置得太高一样,但实际上并不会由 JMeter 使用,JVM 在进行垃圾收集时将花费更多时间,如果页面文件被广泛使用,您的 JMeter 引擎将不会执行良好,因为磁盘 IO 比 RAM 操作慢得多。
有关针对高负载调整 JMeter 的更多信息,请参阅 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure 文章。
为什么服务器可用内存只有1.5G左右,但是在jmeter中设置HEAP为5G后,还能正常启动?
这里会发生的是系统将 in/out 内存交换到 运行 Java 程序。
它可能有效,但会对 Jmeter 的性能产生非常负面的影响。
因此,根据经验,您应该绝对避免对您的 java 程序
进行任何交换 in/out根据 Java Performance Tuning, Profiling, and Memory Management 文章
Unless you have problems with pauses, try granting as much memory as possible to the virtual machine
Setting -Xms and -Xmx to the same value ….but be sure about the application behaviour
Be sure to increase the memory as you increase the number of processors, since allocation can be parallelized
Don’t forget to tune the Perm generation
根据Make Sense of Memory Management and Key Memory Measurements
Cached memory holds data or program code that has been fetched into memory during the current session but is no longer in use now. If necessary, the Windows memory manager will flush the contents of cached memory to make room for newly summoned data.
Free memory represents RAM that does not contain any data or program code and is free for use immediately.
Commit Charge (also called commit size) is the total amount of virtual memory that a program has touched (committed) in the current session, including memory that has been paged out of physical memory to the disk-backed page file. The Memory and Physical Memory counters on Task Manager’s Performance tab represent the sum of this value for all processes and the kernel. The Commit Charge Limit is the total amount of physical RAM and page file available—in other words, the maximum virtual memory.
因此您的系统可以比您在 Free memory
中看到的更多,因为它可以从缓存和虚拟池分配额外的页面,因此为 JMeter 提供 5 GB space 应该没问题。
但是您需要关注 JVM 堆使用情况和垃圾收集 activity(这可以使用 JVisualVM 来完成)就好像您将堆设置得太高一样,但实际上并不会由 JMeter 使用,JVM 在进行垃圾收集时将花费更多时间,如果页面文件被广泛使用,您的 JMeter 引擎将不会执行良好,因为磁盘 IO 比 RAM 操作慢得多。
有关针对高负载调整 JMeter 的更多信息,请参阅 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure 文章。