Kernel-Konfiguration: Anzahl möglicher Semaphoren erhöhen

Morfio

Well-Known Member
[Gelöst] Kernel-Konfiguration: Anzahl möglicher Semaphoren erhöhen

Hallo alle zusammen,

wir haben hier ein Problem mit PostgreSQL - und zwar: wenn wir mehr als 40 Verbindungen gleichzeitig laufen lassen möchten, kommt beim Starten von Postgres die Fehlermeldung, dass unser FreeBSD nicht genügend Semaphoren für Postgres erzeugen kann.

Daraufhin wollten wir anhand der Anleitung die mögliche Anzahl erhöhen:

http://www.postgresql.org/docs/8.0/static/kernel-resources.html#SYSVIPC

was allerdings nicht funktioniert, da der Kernel sich nicht durchkompilieren lässt. Hier einmal die Optionen, die wir hinzugefügt haben:

# Fuer PostgreSQL
options SHMALL=16384
options SHMMAX=64000
options SHMMAXPGS=4096
options SHMSEG=256
options SEMMNI=256
options SEMMNS=512
options SEMMNU=256
options SEMMAP=256

Was können wir noch probieren?

Vielen Dank an alle,

Morfio ...
 
Zuletzt bearbeitet:
Wie lautet den die Fehlermeldung genau?

Im erwähnten Link sind leicht andere Einträge erwähnt. (SYSVSHM und SYSVSEM fehlen bei dir). Könnte es daran liegen?

mousaka
 
Im GENERIC ist SYSVSHM/SYSVSEM bereits integriert, d.h. ihr könntet das evtl auch einfach per sysctl(8) setzen, statt alles neu zu basteln. Hier die entsprechenden Optionen und deren Standardwerte:
Code:
kern.ipc.semaem: 16384
kern.ipc.semvmx: 32767
kern.ipc.semusz: 92
kern.ipc.semume: 10
kern.ipc.semopm: 100
kern.ipc.semmsl: 60
kern.ipc.semmnu: 30
kern.ipc.semmns: 60
kern.ipc.semmni: 10
kern.ipc.semmap: 30
kern.ipc.shmall: 32768
kern.ipc.shmseg: 128
kern.ipc.shmmni: 192
kern.ipc.shmmin: 1
kern.ipc.shmmax: 67108864
 
@mousaka

Die Fehlermeldung lautet:

===> aic7xxx/ahc/ahc_pci
cc -O -pipe -I/usr/src/sys/modules/aic7xxx/ahc/ahc_pci/../../../../dev/aic7xxx -I.. -D_KERNEL -DKLD_MODULE -nostdinc -I- -I/usr/src/sys/modules/aic7xxx/ahc/ahc_pci/../../../../dev/aic7xxx -I.. -include /usr/obj/usr/src/sys/ELMAR/opt_global.h -I. -I@ -I@/contrib/altq -I@/../include -finline-limit=8000 -fno-common -I/usr/obj/usr/src/sys/ELMAR -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c /usr/src/sys/modules/aic7xxx/ahc/ahc_pci/../../../../dev/aic7xxx/ahc_pci.c
cc -O -pipe -I/usr/src/sys/modules/aic7xxx/ahc/ahc_pci/../../../../dev/aic7xxx -I.. -D_KERNEL -DKLD_MODULE -nostdinc -I- -I/usr/src/sys/modules/aic7xxx/ahc/ahc_pci/../../../../dev/aic7xxx -I.. -include /usr/obj/usr/src/sys/ELMAR/opt_global.h -I. -I@ -I@/contrib/altq -I@/../include -finline-limit=8000 -fno-common -I/usr/obj/usr/src/sys/ELMAR -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c /usr/src/sys/modules/aic7xxx/ahc/ahc_pci/../../../../dev/aic7xxx/aic7xxx_pci.c
ld -d -warn-common -r -d -o ahc_pci.kld ahc_pci.o aic7xxx_pci.o
touch /usr/obj/usr/src/sys/ELMAR/modules/usr/src/sys/modules/aic7xxx/ahc/ahc_pci/export_syms
awk -f /usr/src/sys/modules/aic7xxx/ahc/ahc_pci/../../../../conf/kmod_syms.awk ahc_pci.kld /usr/obj/usr/src/sys/ELMAR/modules/usr/src/sys/modules/aic7xxx/ahc/ahc_pci/export_syms | xargs -J% objcopy % ahc_pci.kld
ld -Bshareable -d -warn-common -o ahc_pci.ko ahc_pci.kld
objcopy --strip-debug ahc_pci.ko
===> aic7xxx/ahd
cc -O -pipe -DAHD_REG_PRETTY_PRINT=1 -D_KERNEL -DKLD_MODULE -nostdinc -I- -include /usr/obj/usr/src/sys/ELMAR/opt_global.h -I. -I@ -I@/contrib/altq -I@/../include -finline-limit=8000 -fno-common -I/usr/obj/usr/src/sys/ELMAR -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c aic79xx_reg_print.c
cc -O -pipe -DAHD_REG_PRETTY_PRINT=1 -D_KERNEL -DKLD_MODULE -nostdinc -I- -include /usr/obj/usr/src/sys/ELMAR/opt_global.h -I. -I@ -I@/contrib/altq -I@/../include -finline-limit=8000 -fno-common -I/usr/obj/usr/src/sys/ELMAR -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c /usr/src/sys/modules/aic7xxx/ahd/../../../dev/aic7xxx/aic79xx.c
*** Error code 1

Stop in /usr/src/sys/modules/aic7xxx/ahd.
*** Error code 1

Stop in /usr/src/sys/modules/aic7xxx.
*** Error code 1

Stop in /usr/src/sys/modules.
*** Error code 1

Stop in /usr/obj/usr/src/sys/ELMAR.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

Vermutlich, weil er die Variablen nicht richtig zuordnen kann.

@kazcor

Vielen Dank, wir haben das in die loader.conf getan und jetzt funktioniert es.

Viele Grüße, Morfio ...
 
Welche Werte denn? Ich benoetige folgende um neben Symon noch Postgres ueberhaupt starten zu koennen
Code:
kern.ipc.shmmax="2*33554432"
kern.ipc.shmall="2*8192"
kern.ipc.semmni="256"
kern.ipc.semmns="512"
kern.ipc.semmnu="256"
kern.ipc.semmap="256"
 
Welche Werte denn? Ich benoetige folgende um neben Symon noch Postgres ueberhaupt starten zu koennen
Code:
kern.ipc.shmmax="2*33554432"
kern.ipc.shmall="2*8192"
kern.ipc.semmni="256"
kern.ipc.semmns="512"
kern.ipc.semmnu="256"
kern.ipc.semmap="256"

Das habe ich reingeschrieben:

kern.ipc.semaem=16384
kern.ipc.semvmx=32767
kern.ipc.semusz=92
kern.ipc.semume=10
kern.ipc.semopm=100
kern.ipc.semmsl=60
kern.ipc.semmnu=30
kern.ipc.semmns=200
kern.ipc.semmni=40
kern.ipc.semmap=30
kern.ipc.shmall=32768
kern.ipc.shmseg=128
kern.ipc.shmmni=192
kern.ipc.shmmin=1
kern.ipc.shmmax=67108864

Viele Grüße, Morfio ...
 
Zurück
Oben