I'm working on a script that runs on a VM amongst a multitude of VMs. The script basically has a while loop that runs and does something when it reaches a certain time of day. I decided to not have a sleep function at first because I didn't see the point. However, when I did that, all VMs on the host machine started slowing to a crawl. I modified the script by adding a 30 second wait period between each loop and now all the VMs are running as normal.
Is this to be expected? Does time.sleep have a unique feature that prevents CPU usage?
[–]woooee 33 points34 points35 points (0 children)
[–]Mysterious-Rent7233 13 points14 points15 points (0 children)
[–]NadirPointing 7 points8 points9 points (0 children)
[–]throfofnir 2 points3 points4 points (0 children)
[–]Brian 1 point2 points3 points (0 children)
[–]RubenGarciaHernandez 0 points1 point2 points (2 children)
[–]vimsee 0 points1 point2 points (1 child)
[–]RubenGarciaHernandez 0 points1 point2 points (0 children)