Skip to content
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

nfacctd: print plugin -- writer [netflow] multiple processes are created and consume 40% of my system memory #787

Closed
hemant61201 opened this issue May 26, 2024 · 4 comments
Labels

Comments

@hemant61201
Copy link

I implemented nfacctd version 1.7.1 and encountered an issue with the nfacctd print plugin. Multiple processes were created by the writer [netflow], consuming 40% of my system memory, and I observed a flow rate of around 15-17k EPS.

@paololucente
Copy link
Member

Hi @hemant61201 ,

Can you share your configuration? This may depend on the selected (de-)aggregation along with caching time (refresh time). Also can you confirm which version are you using? 1.7.1 or 1.7.10. If 1.7.1, as you mentioned, that is not supported anymore and i'd advice to upgrade to something more recent.

Paolo

@hemant61201
Copy link
Author

Hi @paololucente,

Here is my config file :
nfacctd-conf.txt

I implemented nfacctd version 1.7.1 and encountered an issue with the nfacctd print plugin.

Since version 1.7.1 is not supported, could you please advise which version I should update to in order to resolve this issue? Additionally, could you elaborate on the conditions under which multiple print plugin writer processes are created?

@hemant61201
Copy link
Author

Hi @paololucente,

I upgraded pmacct version to 1.7.9 but still i faced the same issue.

Here i Attached the screen shots :
nfacctd_processes
nfacctd_version

@paololucente
Copy link
Member

Hi @hemant61201 ,

The urgent writers are triggered by the fact the cache space of the plugin is finished. This is related to the (de-)aggregation method you configured: the more flows you have, the more you de-aggregate, the more cache space you need in order to keep in memory all the entries for the wanted refresh time (by default 60 seconds). Also, because you write to a fixed file NetFlow (argument to print_output_file[NetFlow]), the writers will tend to lock out with each other.

My recommendations:

  1. add at least a %s to the file name, ie.: print_output_file[NetFlow]: NetFlow_%s;
  2. increase the cache space (of course this is limited by the memory available, print_cache_entries, read more here:
    KEY: [ sql_cache_entries | print_cache_entries | amqp_cache_entries | kafka_cache_entries ]
    ) or reduce the time interval to write to files (print_refresh_time, read more here:
    KEY: [ sql_refresh_time | print_refresh_time | amqp_refresh_time | kafka_refresh_time ] (-r)
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants