Add a defer flag to iscsi target/extent/targetextent create/update/delete #16614
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a defer flag to iscsi target/extent/targetextent create/update/delete. This results in a measureable speedup in iscsi performance: roughly 3.75x faster per create/delete cycle. This commit is part of the effort to add a TrueNAS driver to Incus.
This is BEFORE
So, 5.3s to create a share. 15.22s to delete it.
And then the same tool, when running against a “defer” enhanced middleware.
1.934s to create, and 3.5s to delete.
That makes deleting 4.3x faster, and creating 2.74x faster.
Here’s a clearer run without all the debug:
Showing 5x faster deletes.
Here’s where the rubber hits the road.
Previously, when running Incus’s basic_usage integration suite against a TrueNAS host... they’d take about 30 minutes.
But with the changes to defer reload until the end of the procedure its under 10 minutes.
That is a 3.1x improvement in the test run time… and not all of the run time is due to create/delete overhead, but it is very significant.
The full standalone Incus test suite takes about 5hrs to run against a TrueNAS. We’re hoping they reduce significantly with these changes.
@kmoore134
@william-gr