The author recently did a virtualization-related demo involving server load balancing in a virtualized environment. We use a simple case where live migration occurs when the load is "unbalanced." Since it is only a demo, our load temporarily only considers the utilization of the CPU. In actual preparation, due to the lack of client pressure, it is difficult to achieve precise control of CPU utilization. Here I wrote a simple script program, through adaptive adjustment, to achieve the server CPU utilization within a certain range, in order to ensure that when a server CPU is too high, the virtual machine will be automatically migrated to Tests were performed on other machines with low CPU utilization.
The script implemented by python is as follows. This script requires input of 5 numeric parameters, respectively:
Minimum CPU utilization, maximum CPU utilization, initial thread count, thread for each adjustment Quantity, the time each thread sleeps (milliseconds)
Of course, to a large extent, these parameters are highly empirical due to the different hardware environments.
#!/usr/bin/python
In general, this script is relatively simple. And on different machines, the operator's experience is required to initialize to achieve the best results. But this is my first python program, and it has achieved the intended purpose. The above is just the core code that can run. As for usage, error handling, exiting the program, etc., it is not given:)
I am a netizen, working as a network administrator in a company. At the beginning of the year, some
. Recently servers are often subject to hacker intrusion. Intruder technology is more sophisticated,
W3SVC is perhaps the least noticeable component of the IIS 6.0 archit
Windows built-in Internet Information Services (IIS) has good support
Seven newbie skills Deadly server security maintenance
The time synchronization solution
One way to solve the problem that the application pool is automatically disabled is
Explain IIS website server performance optimization cheats thirteen articles
X86 or RISC? Server selection should consider 12 points
Lnmp cancels nginx directory PHP execution permission
Pseudo-static URL rewriting technology implementation method php asp
Four server virtualization partitions for HP-UX technology
Solution for Windows Network Share mapped drive connection may be lost
Play classic games under Linux system CS1.5 server setup
Skills experience: What preparations should be made to build a private cloud?
What are the Win10 preview BUG? Win10 preview version is known to be BUG summary
Win10 system default browser how to set
How to uninstall Windows 10 Preview
Win10 system exception How to view the computer problem report?
DNF re-take the brave road activity website share Bailian Chenggang win brave badge gift box
Windows10 login screen how to automatically open the keypad digital lock
Meitu Xiu Xiu produces panoramic effect
How to protect the shared folder of the LAN?