Le spiegazioni sono nel manuale di PostgreSQL: per la ver. 8.1 sono al link http://www.postgresql.org/docs/8.1/static/kernel-resources.html
Ora ho poco tempo, ti riassumo che c'è una formuletta per calcolare il valore di SHMALL e SHMMAX da impostare nel kernel, in base al numero di connessioni accettate da PostgreSQL. stalcio:-------------------- The most important shared memory parameter is SHMMAX, the maximum size, in bytes, of a shared memory segment. If you get an error message from shmget like Invalid argument, it is likely that this limit has been exceeded. The size of the required shared memory segment varies depending on several PostgreSQL configuration parameters, as shown in Table 16-2. You can, as a temporary solution, lower some of those settings to avoid the failure. As a rough approximation, you can estimate the required segment size as 500 kB plus the variable amounts shown in the table. (Any error message you might get will include the exact size of the failed allocation request.) While it is possible to get PostgreSQL to run with SHMMAX as small as 1 MB, you need at least 4 MB for acceptable performance, and desirable settings are in the tens of megabytes. ----------------------- Più giù nella pagina del manuale ti dice cosa impostare a seconda del SO. Io per 1000 connessioni e 10000 shared buffers settavo circa 128MB (134217728): in postgresql.conf:------------- max_connections = 1000 shared_buffers = 10000 # min 16, at least max_connections*2, 8KB each -------------------- /etc/sysctl.conf:--------------- kernel.shmall = 134217728 kernel.shmmax = 134217728 ----------------- poi faccio caricare le nuove impostazioni con : [r...@taonline data]# /sbin/sysctl -p Infine avvio postgresql. Nel messaggio di errore ti ha detto lui stesso quanta memoria gli serviva e non ha trovato: DETAIL: Failed system call was shmget(key=5432001, size=39149568, 03600). Ne voleva 39MB (39149568) ma tu ne hai 33MB (33554432) Puoi passare a 50MB e vedere che succede. Vito Alle 12:17, lunedì 19 gennaio 2009, Francesco P. Lovergine ha scritto: > On Thu, Jan 15, 2009 at 04:05:54PM +0000, Eugenio Trumpy wrote: > > > Non esageriamo, basta impostarla in /proc/sys/kernel/shmmax con echo, > > > sysctl oppure impostandola in /etc/sysctl.conf per mantenere il valore > > > al reboot. Tieni conto che shmmax e' la dimensione del massimo blocco > > > di shared mem allocabile non il massimo della shared memory totale, che > > > e' invece ricavabile da shmall dove e' espresso il numero massimo di > > > pagine allocabili in tutto per la shared memory. > > > > Ciao, > > in /proc/sys/kernel/shmmax > > ho il solo valore numerico > > 33554432 > > > > io putroppo non so se è tanto? poco? che valora ci devo inserire? > > e perchè dopo un anno di ottimo funzionamento mi è successo questo > > inconveniente? C'è un motivo? > > 30MB mi pare sufficiente, puo' essere che semplicemente esaurisca la shmem > totale piu' che altro. Aumentare a 50MB? > > > Invece in /etc/sysctl.conf non c'è alcun riferimento a shmmax ... > > Giusto che sia così??? > > E' normale. -- Ing. Vito Meuli Tecnologie Avanzate S.r.l. via B. Croce, 49 70015 Noci (BA) tel. +39 080 4979652 fax +39 080 4979263 email: [email protected] http://www.tecnologieavanzate.it _______________________________________________ Iscriviti all'associazione GFOSS.it: http://www.gfoss.it/drupal/iscrizione [email protected] http://www.faunalia.com/cgi-bin/mailman/listinfo/gfoss Questa e' una lista di discussione pubblica aperta a tutti. I messaggi di questa lista non rispecchiano necessariamente le posizioni dell'Associazione GFOSS.it.
