Stress Testing tps performance degradation problem solution, stress testing tps
Stress Testing tps performance degradation problem solution background
During the force measurement test, the tps has been declining. to reproduce the problem, a simple transaction is developed for testing. The test code is as follows:
Record the transaction script and put it in LoadRunner11 for testing. In this scenario, 10 users can start and run at the same time. It can be seen that tps starts to decline in 1 minute and continues to decline in the later stage.
At this time, no exceptions are found, such as server logs, javacore, heapdump, and gc. But the test results continue to decline. Record the server's request processing time, and found it to be very stable. It was initially suspected that the client was under insufficient pressure, but there was no specific evidence, so the pressure test tps decline was put on hold.
Turning Point
This week, a colleague started a stress test. After talking about the problem, a similar test was also conducted on the site, but the test results were exactly the same. Later, guangfa used the vuser running by process in LoadRunner. The test result is as follows. As you can see, the entire process lasted for three hours, and the tps remained stable at around 950. Now there was a breakthrough.
Analysis
Why are the results of running vusers by process in LoadRunner different from those running vusers by thread.
The two types in LoadRunner are described as follows:
Ø run vuser by thread
Start multithreading to run more vusers on each server load generator computer.
O run vuser by Process
Disable multithreading and run each vuser as a complete process. Used for non-thread security protocols
The Internet has the following explanation:
Thread resources are allocated from process resources. Therefore, multiple threads in the same process have shared memory space.
The memory usage of the mdrv.exe (lr program used to run the vuser) process when the vuseris run by using the god javavisualvm.pdf. We can see that fullgc has been executed 94 times in 7 minutes, after careful consideration, we can find that the new generation is 896 k + 64 k * 2 = 1024 k, the maximum is 4992 k, the old generation is 4 m, and the maximum is 59.125 m. In this case, we assume that the jvm memory allocation is too small.
Optimization
Now adjust the VM memory and use the same scenario for testing. The jvm parameters and test results are as follows:
Jvm parameters:-Xmn128m-Xmx384m-Xms384m-XX: PermSize = 64 m-XX: MaxPermSize = 128 m
As expected, the test runs stably. The memory usage is as follows:
We can see that the memory usage of the old generation has been stable at 1.457 m, and the persistent generation memory has been stable at 5.616 m,
Full GC is not performed throughout the process, and garbage collection is all performed in the young generation.
Based on this test, we continue to adjust the virtual machine parameters in this scenario, increase the number of young generations, and reduce the number of old and persistent generations. The same scenario is used for testing. The jvm parameters and test results are as follows:
Jvm parameter:-Xmn320m-Xmx384m-Xms384m-XX: PermSize = 12 m-XX: MaxPermSize = 12 m
Continue to check the memory usage during the test.
We can see that during the period of, the young generation executes gc for 2304 times, which takes 45.703 s. Compared with the previous test run for, the young generation executes gc for 3228 times, which consumes 35.965 s.
Conclusion
The continuously decreasing tps in this stress test is not caused by the processing performance of the server and client, but by the unreasonable memory allocation of the stress test client.
If a similar situation occurs during subsequent tests, you can choose to run the vuser by process or adjust the memory parameters according to the actual transaction scenario to ensure that subsequent tests are normal.
Appendix
Memory usage of one of the processes when running vuser by process:
The overclocking graphics card performance can be reduced. How can this problem be solved?
By increasing the frequency of the processor or video card, that is, the super frequency, we should give the computer better performance, but sometimes we find that the performance of the processor and video card is much lower after the Super frequency, as long as we check the overclocking settings step by step, we can find the reason why the performance of the processor and video card is not improved but decreased after the overclocking.
1. performance degradation due to insufficient voltage or overheating
If the voltage setting is not high enough when the processor is over-frequency, the apparent frequency may rise. However, in fact, the processor cannot work at full speed, that is, the performance may drop. Therefore, voltage increase is the simplest method, not only the core voltage of the processor, but also the voltage of the North Bridge and bus. Generally, the increase cannot exceed 0.05 V. The video card may also cause performance degradation for the same reason, but it is not recommended to increase the video card voltage, because the video card basically has no overclock protection design, once the voltage is too high, it may be burned out directly. Therefore, it is best to reduce the frequency of the video card.
In addition, high temperature may cause serious electronic loose in the processor, affecting internal communication, resulting in performance degradation. Therefore, the heat dissipation must be done well during overclocking.
2. unreasonable overclocking parameters affect performance
An unreasonable overclocking parameter may also cause performance degradation. For example, the default frequency of an N-card is 576/1242/2000 MHz (core/shader/memo-ry ), if the Shader frequency is over 1800 MHz, the core frequency is about 812/1800 MHz, and the video card performance is the highest. If the core frequency is increased to 850 MHz, it seems that the video card has exceeded a relatively high frequency. However, because the Shader frequency is only about MHz, the performance of the video card may decrease compared with the previous overclocking settings.
This problem also exists in the processor overclocking, but the processor should be simpler, only the relationship between the outer frequency and the multiplier. If you increase the frequency doubling by reducing the external frequency in order to impact the high frequency, even if the processor reaches the high frequency, its performance may be lower than the high frequency.
Therefore, the user should check whether the frequency setting is correct, whether the ratio of the video card frequency is reasonable, and whether the external frequency of the processor is high enough.
The relationship between different frequencies should be handled when the video card is too frequently
3. How can I improve the performance of PCIE locking 1X?
In another case, the game performance of the whole machine is greatly reduced after the overclocking, which is determined by both the processor and the video card. For example, if an E6550 processor is used and the external frequency is increased to 400 MHz, It is started normally and enters the system. After testing all normal, but the speed of the game is significantly lower than the previous, this may be encountered "PCI-E lock in X1" fault. Some boards may experience insufficient power in the north bridge when the processor is too high, resulting in PCIe locking at the speed of 1X, resulting in a significant reduction in game performance. Some motherboard can solve this problem by refreshing the BIOS. If the motherboard manufacturer does not provide BIOS updates for this problem, users can try to increase the voltage of the North Bridge, which can generally be solved.
The problem of locking PCI-E can be solved by increasing the voltage of North Bridge.
4. Non-standard frequency performance cannot be used
At present, the overclocking settings of the motherboard are flexible. For example, if the processor is out-of-band, you can ~ You can set any number between 999, but on some boards, if you set a non-standard frequency, that is, a value other than 133, 266, or 333, this may lead to poor coordination between the motherboard and the processor, resulting in reduced computing performance of the processor. In this case, if you cannot update the BIOS of the motherboard, you can only set the frequency to a standard value to ensure the performance of the processor.
If the processor/video card itself is not good, the performance of the processor and video card will also be reduced after the processor and video card overclock. The reason for this situation is complicated. It may be because of the overclock heat, which leads to messy signal in the processor. Therefore, do not overclock the hardware that is not very good.
Properties and shrinkage of plastic TPS
The shrinkage is between 0.5 and 2%. TPS usually represents a type of material, including SBS, SIS, SEBS, and SEPS. SBS can be in contact with water, weak acid, and alkali, and has excellent tensile strength, large surface friction coefficient, good low temperature performance, excellent electrical performance, and good processing performance, it has become the most consumed thermoplastic elastic body.
Huang yinlu [authoritative expert]