|
I've been looking at the "Search Job Inspector" recently and noticing that Based on general optimization principles, I'm starting with the following assumptions:
If I'm missing something or have any of this wrong so far, please say so. #1: Reduce number of eventtypes:Based on the Eventtypes' numbers limits question, the answer suggested that the total number of eventypes should ideally be limited to a few hundred. However, I'm not sure that very realistic. (The answer wasn't clear, but I'm thinking that a "few hundred" means somewhere between 200-400?) I looked at my system and I currently have over 340 eventtypes defined that are shared across all apps. Of those, 111 of the come from the I have an app with nearly 100 app-level eventtypes. It's fairly self contained, and it would be nice to "block" out the eventypes of the other apps to improve performance within that app, but that's not possible as far as I know. Again, it seems inevitable that the number of eventtypes will only grow as splunk usage increases. So other than doing some cleanup, it doesn't seem possible to reduce this dramatically. #2 Optimize eventtype definitions:This is where I would really like to focus my efforts. The problem is, I haven't come across any recommendations/suggestions/guidelines as to how to write more-efficient eventtypes, and I would really appreciate some input from the people who know this stuff. Without a good place to start, I've done what I always do: Ask lots of questions! If these can be answered directly, that would be great, but even starting with some general principles would be a great help. Even a never-do-this list would be helpful. Here are some specific eventtype performance questions: What's the impact of...
I'm guessing there are lots of corner cases here. An eventtype definition can go across tons of layers which is what makes them so powerful, and I'm sure that also mean they can be quite expensive at times too. So any hints would be appreciated, and some kind of "profiler tool" would be amazing (I'll even consider naming my first born after you.) Thanks in advance! |
|
There are very few suggestions about general eventtype optimization:
There are two modes in which the splunk UI executes searches:
There is one neat trick to avoid the eventtyping even when running searches from the flashtimeline view: simply add "| fields - eventtype" to your search, for example:
Note, that the number of eventtypes a search has to consider will not linearly correlate with the performance of eventtyping - the reason for this is that many eventtypes will share terms, phrases or field comparisons which we evaluate only once. Thanks for your response; it was helpful. Can you confirm that using
(02 Jul '10, 22:05)
Lowell ♦
For anyone following along at home. I can confirm that using "
(21 Jan '11, 15:49)
Lowell ♦
For me, i had to also exclude tags on eventtypes that come with the windows app. |fields - eventtype,tag::eventtype|
(05 Feb '11, 05:57)
gfriedmann
|
|
My understanding is:
Thank you. Another very helpful answer! Help me out point #2, am I understanding this correctly: If a given field is used in the definition of one eventtype, then there is no (or very minimal) additional cost incurred by using that same field in additional eventtypes. Is that right?
(02 Jul '10, 21:35)
Lowell ♦
So if that's true, then what if that same named field is extracted by different extractions? It's not uncommon for two different sourcetypes to extract the same named field, but using different regexes. I'm guessing splunk must maintain some sort of fieldname to extractor mapping (which, of course the "$1::$2" extractions must really add some complexity)
(02 Jul '10, 21:37)
Lowell ♦
re: your first comment. yes.
(04 Jul '10, 03:23)
jrodman ♦
I'm not aware of the full algorithm for what extractions are run in the case that a field is requested. Generally speaking, none of this matters much unless the data quantity being processed is very large.
(04 Jul '10, 03:24)
jrodman ♦
|

dude, you are amazing. thank you!
Thanks. But I'm not sure if that means that you liked the question, or if you can help get me some answers. ;-)
i liked the question a lot, and i've poked some people to see if they can help. :)