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

[DOC] Add systemd limits instructions in "high-performance-netdata" page #655

Closed
leleobhz opened this Issue Jul 5, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@leleobhz
Copy link

leleobhz commented Jul 5, 2016

Hello,

I suggest add to Limits section of high-performance-netdata, instructions to raise limits using systemd units. I based my config in https://ma.ttias.be/increase-open-files-limit-in-mariadb-on-centos-7-with-systemd/ and here worked as following:

  1. Create the folders in /etc:
mkdir -p /etc/systemd/system/netdata.service.d
mkdir -p /etc/systemd/system/nginx.service.d
  1. Create limits.conf in each folder as following:
[Service]
LimitNOFILE=30000
  1. Reload systemd daemon list and restart services:
systemctl daemon-reload
systemctl restart netdata.service
systemctl restart nginx.service

You can check limits with following commands:

cat /proc/$(ps aux | grep "nginx: master process" | grep -v grep | awk '{print $2}')/limits | grep "Max open files"
cat /proc/$(ps aux | grep "netdata" | head -n1 | grep -v grep | awk '{print $2}')/limits | grep "Max open files"

My Ubuntu 16.04, with netdata installed in default system, returns the following:

root@deodora:~# tree /etc/systemd/system/*service.d/etc/systemd/system/netdata.service.d
└── limits.conf
/etc/systemd/system/nginx.service.d
└── limits.conf

0 directories, 2 files
root@deodora:~# cat /proc/$(ps aux | grep "nginx: master process" | grep -v grep | awk '{print $2}')/limits | grep "Max open files"
Max open files            30000                30000                files     
root@deodora:~# cat /proc/$(ps aux | grep "netdata" | head -n1 | grep -v grep | awk '{print $2}')/limits | grep "Max open files"
Max open files            30000                30000                files     
root@deodora:~# lsb_release -d
Description:    Ubuntu 16.04 LTS

If you devs like this procedure, please add it to documentation. I do not know well how to edit the Wiki and even has a good markdown domain, but I think this procedure can help a lot users of systemd (CentOS 7, Ubuntu > 15.10, etc...).

Thanks.

@leleobhz leleobhz changed the title [DOC} Add systemd limits instructions in "high-performance-netdata" page [DOC] Add systemd limits instructions in "high-performance-netdata" page Jul 5, 2016

@paulfantom

This comment has been minimized.

Copy link
Collaborator

paulfantom commented Jul 7, 2016

I don't think there is currently any problem with keeping open too many files, so why raise the limit?

Main plugin which needs to open many files is apps plugin but I believe it opens file, reads it, and then closes it.

Could you explain why do you need to raise number of file descriptors?

@leleobhz

This comment has been minimized.

Copy link
Author

leleobhz commented Jul 7, 2016

Hello @paulfantom

I just followed the Wiki https://github.com/firehol/netdata/wiki/high-performance-netdata and noticed there is no instructions to do this configuration within systemd, so I did it and im adding it here as a proposion to insert in documentation.

I don't know if it still applicable but I did it since is in the documentation.

Thanks

@paulfantom

This comment has been minimized.

Copy link
Collaborator

paulfantom commented Jul 7, 2016

@leleobhz my bad, I didn't see that.

@ktsaou

This comment has been minimized.

Copy link
Member

ktsaou commented Jul 7, 2016

Thanks! I also was wondering where to add them.

Added them: https://github.com/firehol/netdata/wiki/high-performance-netdata#2b-limit-open-files-systemd

@ktsaou

This comment has been minimized.

Copy link
Member

ktsaou commented Jul 7, 2016

I am closing this. If you need something more to add, just post.

@ktsaou ktsaou closed this Jul 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.