openVZ7: how to set fs.file-max ? [message #52724] |
Mon, 30 January 2017 17:43 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
unlim
Messages: 22 Registered: May 2011 Location: Ukraine
|
Junior Member |
|
|
I'm trying to set fs.file-max inside CentOS7 CT:
# cat /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
fs.file-max = 16777216
# sysctl -p
sysctl: setting key "fs.file-max": No such file or directory
So, how to set fs.file-max ?
|
|
|
|
|
Re: openVZ7: how to set fs.file-max ? [message #52735 is a reply to message #52724] |
Wed, 08 February 2017 10:24 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
khorenko
Messages: 533 Registered: January 2006 Location: Moscow, Russia
|
Senior Member |
|
|
unlim,
this sysctl "fs.file-max" is not virtualized (it is global for the whole Node) so you cannot change it from inside a Container,
you can change it on the Hardware Node only.
The error "sysctl: setting key "fs.file-max": No such file or directory" is a bit strange to me,
i'd expect "sysctl: permission denied on key 'fs.file-max'",
but this is another story.
If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
|
|
|
Re: openVZ7: how to set fs.file-max ? [message #53055 is a reply to message #52724] |
Wed, 13 December 2017 06:07 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
jamesmoliver
Messages: 1 Registered: December 2017 Location: United Kingdom
|
Junior Member |
|
|
Your operating system set limits on how many files can be opened by any running application on your host. You can extend the basic values usually 1024 easily by modifying 2 configuration files:
# vi /etc/sysctl.conf
fs.file-max = 32000
# vi /etc/security/limits.conf
youruser soft nofile 10000
youruser hard nofile 30000
[Updated on: Thu, 14 December 2017 17:22] by Moderator Report message to a moderator
|
|
|