-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ossec-authd performance issues when generating large number of keys (20k+ ) #873
Comments
Most of OSSEC isn't threaded or anything, so the CPU usage makes sense. If you stop requesting keys, then request 1 key with a high agent id, does it still take 60+ seconds? |
Dan @vikman90 pointed out to this patch *The response time went down from mins to ms . Our use case:
we did some load test and here are some results :With 0.5 sec gap/sleep between requests:all request ( 107 of them ) succeeded with an average response time of 0.28 secs for each key with 0.1 sec gap/sleep between requests:all requests succeeded with an average response time of 0.32 sec with 0.05 sec gap/sleep between requests:for 250 requests: 100% succeeded with an average response time of 5.8 sec For concurrent requests ( while using only one client to create parallel threads):~150 concurrent requests was supported with an average creation response time of 7.14 sec |
Neat. Can you put together a pull request? |
Sorry about the delays @ddpbsd . We have deployed the in prod and it works great :D. Need suggestion on the patch . I presume for folks who are not using at scale like ours they might still like to turn it on as the search space is small . We use a macro ( #define REUSE_RIDS 0 ) to replace the old code . Kindly let me know which option is preferred :) ? Then I will quickly drop the pull request. |
@avisri I haven't been able to look at this much, but the closer your patch is to the original the better IMO. That should make it easier to keep both versions up to date. |
Hi all. I just sent the PR with the original patch that I made. I think that it isn't necessary to use the old way with few agents because the number of attempts stills being low. E.g. with 4000 agents, @avisri I'm very glad that it's working great in your system! Thank you very much for testing it and for your feedback. Thank you all for your interest, I hope it's useful to the OSSEC community. |
Merged. Thanks. |
+1 Thanks Sent from my iPhone
|
Thanks thats helps. Will make it a compile time switch instead of runtime logic switch. Considering MAX_AGENTS itself is a compile time option it will be easy to follow it and make a new Macro/flag REUSE_ID .
|
@avisri: Do you mean the This feature allows Because of this, we disable the boosted search when |
Thanks again for the details . Yes I did understand it similarly that it was one or the other in your patch . However the macro did kindle a few questions in my mind . This is a good segue way to my next question / feature request : Sent from my iPhone
|
ossec-authd is taking 60 sec + to generate client keys when generating id >20k client key and uses up 80%-100% of Cpu / core/ request on a 8 core system (vm) .
Was able to reproduce -
use a windows or a mac client (s) ( one /server core ) to keep requesting key .
You can queue upto 512
server side mods:
The text was updated successfully, but these errors were encountered: