Change batch_size and ulimit type #811
Open
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.
Issue
Hi while playing with Your tool i stumbled across this message:
[~] File limit higher than batch size. Can increase speed by increasing batch size '-b 524188'.
But when I ran tool with reccomended parametr I got:
After further inspection I found out that
batch_size
isu16
which indeed can hold up to 65535, and that is way lower than some OSes can use.My OS info
ulimit -Hn
Thought process
batch_size
variable is directly tied toulimit
variable it made sense for those 2 variables to use the same type. Especially when those values are being compared.ulimit
is directly tied to OS and OS architecture it made sense for this type to beusize
which is affected by OS architecture.Also quick thought. Capping the
batch_size
based on OSulimit
may fix the issue described here.What does it change
batch_size
which may increase tool performance based on user's OS ulimits and may be helpful when scanning multiple addresses.Benchmarks
Using
time
on precompiled binaries with 'cargo build --release':batch_size
based on OS cap:As You can see the higher batch size makes initial memory allocation a bit slower but overall program executions are way quicker.