Sysctl.conf

De wiki.nexiat.fr
Aller à la navigation Aller à la recherche
Fiche express
Type Paramètres noyau Linux
Contexte Oracle Database 11g R2
Voir aussi Kernel parameters 11gR2 · Database tunning

Paramètres noyau (`/etc/sysctl.conf`) recommandés par Oracle pour héberger une instance Database 11g R2 sur Linux — mémoire partagée, sémaphores, réseau, descripteurs de fichiers. Voir Kernel parameters 11gR2 pour un script qui calcule automatiquement les valeurs mémoire selon la RAM disponible.

Fichier à ajouter/fusionner dans /etc/sysctl.conf

# +---------------------------------------------------------+
# | KERNEL PARAMETERS FOR ORACLE DATABASE 11g R2 ON LINUX   |
# +---------------------------------------------------------+

# +---------------------------------------------------------+
# | SHARED MEMORY                                           |
# +---------------------------------------------------------+

# Maximum size (in bytes) for a shared memory segment
kernel.shmmax = 4294967295

# Maximum amount of shared memory (in pages) that
# can be used at one time on the system and should be at
# least ceil(SHMMAX/PAGE_SIZE)
kernel.shmall = 2097152

# Maximum number of shared memory segments system wide
kernel.shmmni = 4096

# +---------------------------------------------------------+
# | SEMAPHORES                                              |
# +---------------------------------------------------------+

# SEMMSL_value  SEMMNS_value  SEMOPM_value  SEMMNI_value
kernel.sem = 250 32000 100 128

# +---------------------------------------------------------+
# | NETWORKING                                              |
# +---------------------------------------------------------+

# Defines the local port range that is used by TCP and UDP
# traffic to choose the local port
net.ipv4.ip_local_port_range = 9000 65500

# Default setting in bytes of the socket "receive" buffer which
# may be set by using the SO_RCVBUF socket option
net.core.rmem_default = 262144

# Maximum setting in bytes of the socket "receive" buffer which
# may be set by using the SO_RCVBUF socket option
net.core.rmem_max = 4194304

# Default setting in bytes of the socket "send" buffer which
# may be set by using the SO_SNDBUF socket option
net.core.wmem_default = 262144

# Maximum setting in bytes of the socket "send" buffer which
# may be set by using the SO_SNDBUF socket option
net.core.wmem_max = 1048576

# +---------------------------------------------------------+
# | FILE HANDLES                                            |
# +---------------------------------------------------------+

# Maximum number of file-handles that the Linux kernel will allocate
fs.file-max = 6815744

# Maximum number of allowable concurrent asynchronous I/O requests
fs.aio-max-nr = 1048576

Appliquer sans redémarrer :

# sysctl -p

⚠️ Ces valeurs (notamment `kernel.shmmax`/`kernel.shmall`) sont dimensionnées pour une machine avec beaucoup de RAM — sur un serveur plus modeste, `shmmax` ne doit pas dépasser la RAM physique disponible. Voir Kernel parameters 11gR2 pour un calcul automatique en fonction de la RAM détectée.

Voir aussi