ManageIQ / inventory_refresh

Apache License 2.0
1 stars 23 forks source link

Check changed strategy for batch #81

Closed Ladas closed 5 years ago

Ladas commented 5 years ago

Test case 1st refresh creating ~1.2M records, 2nd refresh updating ~1.2M records with no changes, with 3 persisters and 5 partitions (with this setup, 1 persister is slacking, since it get only 1 partitions assigned)

with use_ar_object => true

refresh max saving 1 part avg saving 1 part total time max memory
1st 1.53s 0.47s 28.5m 100MB
2nd 1.09s 0.38s 25.3m 105MB

with use_ar_object => false

refresh max saving 1 part avg saving 1 part total time max memory
1st 1.53s 0.47s 28.5m 100MB
2nd 1.06s 0.28s 25.15m 97MB

Evaluation

use_ar_object => false is a bit quicker, but it always updates everything, so it stresses the DB much more. Also by updating everything, we don't get reliable report about what was changed.

miq-bot commented 5 years ago

Checked commits https://github.com/Ladas/inventory_refresh/compare/d6e9113df9b2f74737c24d7da7751c3eac85cedf~...83e6cb187fc5a889c5be5d0d6a322c2326dc1d46 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 6 files checked, 0 offenses detected Everything looks fine. :star: