gns3-server icon indicating copy to clipboard operation
gns3-server copied to clipboard

Request: Add node start delay in seconds

Open g1augusto opened this issue 7 years ago • 4 comments

Hi Everyone,

I remember in older versions of GNS3 it could be set a delay between nodes start, this is useful often for nodes that are cpu intensive at boot time and when the topology has many nodes.

This should be a per project setting to override a default general setting.

Now I cannot see this option anywhere unfortunately.

g1augusto avatar Feb 18 '18 12:02 g1augusto

It would be very useful.

Maybe it's possible to define order node by node too ?

Najihel avatar Jun 27 '18 08:06 Najihel

This could be added via a query parameter for the following endpoints:

  • /projects/{project_id}/nodes/start
  • /projects/{project_id}/nodes/stop
  • /projects/{project_id}/nodes/suspend
  • /projects/{project_id}/nodes/reload

grossmj avatar Mar 12 '20 06:03 grossmj

My computer has not much compute power, so I'm also interested in this issue and PR https://github.com/GNS3/gns3-server/pull/1735.

But I have some doubts, that a delay will help much. There are a lot of VMs (Docker, Dynamips, IOU) that start fast and need few CPU power. Others need quite some time, sometimes even minutes, and need considerables resources during startup. So what delay do you want to use? A small one doesn't help much with these CPU demanding VMs, a large one adds unnecessary long delays for the fast booting VMs.

I've created and tested some scripts for a smooth start of VMs. My current favorite uses the following algorithm:

  1. Get the CPU usage of the compute, the node will use
  2. If the usage is above a certain limit (for example 60%) wait some seconds, then try again
  3. Start the VM

To minimize the start time, run this algorithm in parallel for each compute.

b-ehlers avatar May 28 '20 21:05 b-ehlers

But I have some doubts, that a delay will help much. There are a lot of VMs (Docker, Dynamips, IOU) that start fast and need few CPU power. Others need quite some time, sometimes even minutes, and need considerables resources during startup. So what delay do you want to use? A small one doesn't help much with these CPU demanding VMs, a large one adds unnecessary long delays for the fast booting VMs.

Indeed, we should have something smarter that just a dumb start delay that cannot be uniformly applied to all nodes.

I've created and tested some scripts for a smooth start of VMs. My current favorite uses the following algorithm:

  1. Get the CPU usage of the compute, the node will use
  2. If the usage is above a certain limit (for example 60%) wait some seconds, then try again
  3. Start the VM

I like the idea, I think the new VIRL (CML 2.0) has something similar where it actively monitors the amount of CPU/RAM before deciding to start one or more nodes, the author briefly described the process in this video: https://www.youtube.com/watch?v=5xUvqDMxH3g&t=555s

grossmj avatar May 29 '20 10:05 grossmj