Buscar

Este contenido no está disponible en el idioma seleccionado.

Chapter 9. Setting File Handles

download PDF
The maximum number of file handles denotes the maximum number of open files on a Linux system.
Oracle recommends that the file handles for the entire system is set to at least 65536 for 9i R2 and 10g R1 and R2 for x86 and x86-64 platforms.
To determine the maximum number of file handles for the entire system, run:
cat /proc/sys/fs/file-max
To determine the current usage of file handles, run:
$ cat /proc/sys/fs/file-nr
1154    133     8192
The file-nr file displays three parameters:
  • the total allocated file handles.
  • the number of currently used file handles (with the 2.4 kernel); or the number of currently unused file handles (with the 2.6 kernel).
  • the maximum file handles that can be allocated (also found in /proc/sys/fs/file-max).
The kernel dynamically allocates file handles whenever a file handle is requested by an application but the kernel does not free these file handles when they are released by the application. The kernel recycles these file handles instead. This means that over time the total number of allocated file handles will increase even though the number of currently used file handles may be low.
The maximum number of file handles can be changed in the proc file system without reboot:
# echo 65536 > /proc/sys/fs/file-max
Alternatively, you can use sysctl(8) to change it:
# sysctl -w fs.file-max=65536
To make the change permanent, add or change the following line in the file /etc/sysctl.conf. This file is used during the boot process.
echo "fs.file-max=65536" >> /etc/sysctl.conf
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.