-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeBSD: Large sysctl -a output takes >1h to process #47
Comments
+1 for this improvement. Perhaps it might look like this? augeasproviders_sysctl/lib/puppet/provider/sysctl/augeas.rb
Tested with FreeBSD 12.2, FreeBSD 13-ALPHA1 |
By the way, if we can customize the argument per platform, we can get rid of sep = '=' , thanks to the '-e' argument: https://man.freebsd.org/sysctl/8
E.g:
|
I'm fine with that. Can you create a PR please? |
No problems! maybe there is a better variant of the variable name instead of 'sysctl_all_args' ? @ltning BTW, >1h this is a rather strange time. 'sysctl -a' works fast on my systems, but your suggestion is reasonable:
|
Thanks @ALL for picking this up.
It depends. Also note that this refers to the time spent in this sysctl module, not by sysctl itself. |
we will not handle read-only parameters, which are mostly statistics. In some cases, this significantly reduces the modules operating time. While Im here, lets get rid of the separate delimiter - FreeBSD allows you to adjust this with an argument. Issue voxpupuli#47
done, tested with: FreeBSD 13.0-ALPHA1 amd64 |
we will not handle read-only parameters, which are mostly statistics. In some cases, this significantly reduces the modules operating time. While Im here, lets get rid of the separate delimiter - FreeBSD allows you to adjust this with an argument. Issue #47
Suggestion: On FreeBSD, rather than 'sysctl -a', use 'sysctl -a -W' to list only writable sysctls. This excludes statistical and other informational sysctls which on a 12.2-system easily adds up to several megabytes (hundred-and-something thousand lines) of, for our intents and purposes, garbage.
Since this won't work for all platforms, I'm not going to propose a patch that simply adds '-W' to the sysctl() call in the code, although this does work for me.
The text was updated successfully, but these errors were encountered: