addressing icon indicating copy to clipboard operation
addressing copied to clipboard

Cron job can take long time on large ip pools

Open AKorezin opened this issue 2 years ago • 1 comments

Summary

On large ip pools with many unused IP addresses, the cron job could take a lot of time to complete. For example, on a /24 network with no computers, it'll take at least 254 seconds.

I think it will block other background task execution by locking the database.

Version

GLPI: 10.0.6 from tarbal addressing: 3.0.1 from tarbal

To reproduce

  1. Install glpi.
  2. Install addressing plugin.
  3. Enable addressing plugin.
  4. Go to Tools -> IP addressing.
  5. Add a new pool. For example: 192.168.0.1-192.168.0.254. Set ping free ip to yes.
  6. Go to Setup -> Automatic actions -> UpdatePing.
  7. Press Execute button.

Expected behavior

  1. Ping executes in the background without locking the base.
  2. Ping is done by blocks, not the whole pool at once.
  3. Ping is done in parallel, not in one blocking thread.

Additional

Maybe instead of ping, it's better to use fping?

AKorezin avatar Feb 14 '23 09:02 AKorezin

hellp image

makasi4 avatar Feb 24 '23 15:02 makasi4