OpenVZ Forum


Home » General » Support » openVZ7: how to set fs.file-max ?
openVZ7: how to set fs.file-max ? [message #52724] Mon, 30 January 2017 17:43 Go to next message
unlim is currently offline  unlim
Messages: 21
Registered: May 2011
Location: Ukraine
Junior Member
From: *20.18.9.176.clients.your-server.de
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 #52731 is a reply to message #52724] Wed, 08 February 2017 04:33 Go to previous messageGo to next message
ernestinemxiong is currently offline  ernestinemxiong
Messages: 1
Registered: February 2017
Junior Member
From: 59.92.216*
Today my DBA reported that the server she was working on was spitting out "too many open files" errors and no new processes could be started. This is a common problem with DB servers with heavy transactions. In my environment there are 6 DB instances running on the server. No quite the optimized setup I would say. The fix was to increase the total file descriptors kernel parameter count in the /etc/sysctl.conf file. I doubled my limit from 8192 to 16384. The walk through, Find out what the current open file descriptor limit is. View how many open file descriptors are currently being used. View how many files are open. The number returned might defer as 1 file descriptor can have multiple open files attached to it. If you want essay related topic you can go for custom essay writing service will get better result.
Re: openVZ7: how to set fs.file-max ? [message #52734 is a reply to message #52731] Wed, 08 February 2017 09:32 Go to previous messageGo to next message
unlim is currently offline  unlim
Messages: 21
Registered: May 2011
Location: Ukraine
Junior Member
From: *20.18.9.176.clients.your-server.de
ernestinemxiong wrote on Wed, 08 February 2017 06:33
The fix was to increase the total file descriptors kernel parameter count in the /etc/sysctl.conf file. I doubled my limit from 8192 to 16384.


What's the name of parameter you increase ?
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
khorenko is currently offline  khorenko
Messages: 479
Registered: January 2006
Location: Moscow, Russia
Senior Member
From: *virtuozzo.com
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 you problem is solved - please, report it!
It's even more important than reporting the problem itself...
Previous Topic: SSL cert on https://bugs.openvz.org expired
Next Topic: OpenVZ support openSUSE Leap versions?
Goto Forum:
  


Current Time: Tue Nov 21 04:25:44 GMT 2017