-
Notifications
You must be signed in to change notification settings - Fork 41
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
Set core affinity to processor threads #75
Comments
Hi, thank you for suggestion. Do you have a preferred way of setting application affinity? It can be set after the start of the application, e.g. using Is this what you have in mind? Lukas |
Hi Lukas, thanks for your attention The main point is about the main processor thread. Suppose you have a thread that processes the IPFIX messages and also you have some other signaling threads maybe. Only the affinity of the processor thread is important, if I do this with In my opinion, |
Hi, The collector does not have a single process thread. In fact, it is quite parallel. If you look at the picture in the documentation, each block (i.e. plugin instance) represents a single thread. Moreover, there are other "hidden" processing threads - a packet parser thread after each input plugin instance and one output manager thread between the last intermediate plugin and output plugins. In other words, there are at least 4 threads in case of a minimal configuration (one input + one output plugin instance). What do you think is the best practice in this case? Lukas |
Hi, thanks for your description. My purpose is to terminate the OS context switch (which destroys the CPU cache line and ...). My suggestion is you get a core index in each part of the configuration (optionally) and set the processor thread core affinity. For example, if I used TCP input and JSON Kafka output, I can set |
In order to reduce OS context switch overhead, it's good to set core affinity to the processor thread (the user can isolate the specific core from the OS scheduler and use it) to fix the core that will execute the processor function.
The text was updated successfully, but these errors were encountered: