Este contenido no está disponible en el idioma seleccionado.

2.2. Setting Persistent Tuning Parameters


This book contains many examples on how to specify kernel tuning parameters. Unless stated otherwise, the instructions will cause the parameters to remain in effect until the system reboots or they are explicitly changed. This approach is effective for establishing the initial tuning configuration.
Once you have decided what tuning configuration works for your system, you can make them persistent across reboots. The method you choose depends on the type of parameter you are setting.

Procedure 2.1. Editing the /etc/sysctl.conf File

For any parameter that begins with /proc/sys/, including it in the /etc/sysctl.conf file will make the parameter persistent.
  1. Open the /etc/sysctl.conf file in your chosen text editor.
  2. Remove the /proc/sys/ prefix from the command and replace the central / character with a . character.
    For example: the command echo 0 > /proc/sys/kernel/hung_task_panic will become kernel.hung_task_panic.
  3. Insert the new entry into the /etc/sysctl.conf file with the required parameter.
    # Enable gettimeofday(2)
    kernel.hung_task_panic = 0
    
    Copy to Clipboard Toggle word wrap
  4. Run # sysctl -p to refresh with the new configuration.
    ~]# sysctl -p
    ...[output truncated]...
    kernel.hung_task_panic = 0
    
    Copy to Clipboard Toggle word wrap

Procedure 2.2. Editing the /etc/rc.d/rc.local File

Warning

The /etc/rc.d/rc.local mechanism should not be used for production startup code. It is a holdover from the SysV Init days of startup scripts and is executed now by the systemd service. It should only be used for testing of startup code, since there is no way to control ordering or dependencies.
  1. Adjust the command as per the Procedure 2.1, “Editing the /etc/sysctl.conf File” instructions.
  2. Insert the new entry into the /etc/rc.d/rc.local file with the required parameter.
Volver arriba
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. Explore nuestras recientes actualizaciones.

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.

Theme

© 2025 Red Hat