URL:
https://github.com/SSSD/sssd/pull/5552
Title: #5552: files: split update into batches
elkoniu commented:
"""
![files-provider](https://user-images.githubusercontent.com/2312108/122610038-48754100-d07f-11eb-8430-7add79a042cd.png)
Test setup: Fedora 32 virtual machine, 1 CPU, 2G RAM
I run 3 tests with add/delete 100, 250 and 500 users in for loop:
```
for X in 100 250 500; do
time for N in `seq $X`; do useradd test-user-$N; done
time for N in `seq $X`; do userdel -rf test-user-$N; done
done
```
Chart represents the result on common timeline.
[black] raw file provider (SSSD disabled)
[green] latest SSSD master
[orange] SSSD with batching from this PR
[Y scale] CPU usage (0 - 100%)
[X scale] time (one measurement every 2s)
If you count chart volume:
black - 5901
green - 80714
orange - 63912 (-20% comparing to green)
Result:
It is possible to see "waves" representing each user batch: 100, 250 and 500.
1) Raw file provider is fastest and consumes max 15% CPU in each run.
2) Vanilla SSSD is heaviest on CPU and hits 50% even for 100 users add / delete run
3) Batching version is the slowest time wise but about 20% less heavy on CPU than vanilla
SSSD (based on chart volume)
"""
See the full comment at
https://github.com/SSSD/sssd/pull/5552#issuecomment-864251686