Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E18132E181E for ; Tue, 13 Nov 2007 17:20:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 03994-08 for ; Tue, 13 Nov 2007 17:20:22 -0400 (AST) Received: from viefep16-int.chello.at (viefep18-int.chello.at [213.46.255.22]) by postgresql.org (Postfix) with ESMTP id 069D62E1275 for ; Tue, 13 Nov 2007 17:20:21 -0400 (AST) Received: from [192.168.1.104] (really [80.99.119.201]) by viefep16-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20071113212019.ZTSK14118.viefep16-int.chello.at@[192.168.1.104]>; Tue, 13 Nov 2007 22:20:19 +0100 Message-ID: <473A1512.9060307@shopzeus.com> Date: Tue, 13 Nov 2007 22:20:18 +0100 From: Laszlo Nagy User-Agent: Thunderbird 1.5.0.14pre (X11/20071023) MIME-Version: 1.0 To: Peter Koczan CC: pgsql-admin@postgresql.org Subject: Re: SHMMAX problem - how much is needed? References: <473A0242.3070002@shopzeus.com> <4544e0330711131308p62a78e84t4380df68d1624ef5@mail.gmail.com> In-Reply-To: <4544e0330711131308p62a78e84t4380df68d1624ef5@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/114 X-Sequence-Number: 27357 Peter Koczan wrote: >> Minimum shared mem: 140731400 bytes = 135.0 MB >> Maximum shared mem: 268435456 bytes = 256.0 MB >> >> kern.ipc.shmmin="140731400" >> kern.ipc.shmmax="268435456" >> >> Nov 13 20:46:19 neptunus postgres[669]: [1-2] DETAIL: Failed system >> call was shmget(key=5432001, size=21725184, 03600). >> > > The shared memory request, according to the error message, was for ~20 > MB, far less than the 135 MB minimum limit you put in the kernel. > It means that I really did not know what it means. What are the disadvantages of reducing shmmin to one? > You'll need to lower the limit or raise your request size, probably > with regards to shared_buffers, as I think you're only allocating 2 MB > to shared_buffers. You'll want to raise that on a production machine. > I used shared_buffers=2048 which is 2048*8192 bytes = 16MB. The documentation tells that each buffer is 8K (more precisely, BLCKSZ) and it also tells that some thousand is good for a production environment. shared_buffers (integer) Sets the number of shared memory buffers used by the database server. The default is typically 1000, but may be less if your kernel settings will not support it (as determined during initdb). Each buffer is 8192 bytes, unless a different value of BLCKSZ was chosen when building the server. This setting must be at least 16, as well as at least twice the value of max_connections ; however, settings significantly higher than the minimum are usually needed for good performance. Values of a few thousand are recommended for production installations. This option can only be set at server start. Well, this is a test server and I'm using 4096 on a production server but now I'm confused. What should be a good value for this? Thanks, Laszlo