swift/test/unit/obj
Romain LE DISEZ 804776b379 Optimize obj replicator/reconstructor healthchecks
DaemonStrategy class calls Daemon.is_healthy() method every 0.1 seconds
to ensure that all workers are running as wanted.

On object replicator/reconstructor daemons, is_healthy() check if the rings
changed to decide if workers must be created/killed. With large rings,
this operation can be CPU intensive, especially on low-end CPU.

This patch:
- increases the check interval to 5 seconds by default, because none of
  these daemons are critical for performance (they are not in the datapath).
  But it allows each daemon to change this value if necessary
- ensures that before doing a computation of all devices in the ring,
  object replicator/reconstructor checks that the ring really changed
  (by checking the mtime of the ring.gz files)

On an Atom N2800 processor, this patch reduced the CPU usage of the main
object replicator/reconstructor from 70% of a core to 0%.

Change-Id: I2867e2be539f325778e2f044a151fd0773a7c390
2020-04-01 08:03:32 -04:00
..
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
common.py py3: port object auditor 2019-02-27 14:07:33 -06:00
test_auditor.py Use assertIn to check whether substring is in str 2019-04-16 08:56:36 +08:00
test_diskfile.py Lower the log level for falling back to mkstemp 2020-01-22 11:00:18 -08:00
test_expirer.py Deprecate per-service auto_create_account_prefix 2020-01-05 09:53:30 -06:00
test_reconstructor.py Optimize obj replicator/reconstructor healthchecks 2020-04-01 08:03:32 -04:00
test_replicator.py Merge "Fix invalid assert states" 2019-09-20 01:00:00 +00:00
test_server.py New Object Versioning mode 2020-01-24 17:39:56 -08:00
test_ssync_receiver.py Consistently use io.BytesIO 2019-10-15 15:09:46 +02:00
test_ssync_sender.py Consistently use io.BytesIO 2019-10-15 15:09:46 +02:00
test_ssync.py py3: port ssync 2019-06-05 13:26:18 -07:00
test_updater.py sharding: Better-handle newlines in container names 2020-01-03 16:04:57 -08:00