Thread: System V IPC on Windows

System V IPC on Windows

From
Kevin Neufeld
Date:
Does anyone know how to adjust the IPC settings in Windows?

If I wanted to increase shared_buffers settings, in linux I would simply
adjust the SHMMAX and SHMMIN settings, following the docs
(http://www.postgresql.org/docs/8.2/static/kernel-resources.html#SYSVIPC).

In Windows, ....?

Cheers,
Kevin

Re: System V IPC on Windows

From
Tom Lane
Date:
Kevin Neufeld <kneufeld@refractions.net> writes:
> Does anyone know how to adjust the IPC settings in Windows?

There aren't any such settings in Windows, AFAIK.  There's certainly
not anything directly corresponding to SHMMAX, say.  What have you
run into that makes you think you need to adjust something?

            regards, tom lane

Re: System V IPC on Windows

From
"Magnus Hagander"
Date:
> > Does anyone know how to adjust the IPC settings in Windows?
>
> There aren't any such settings in Windows, AFAIK.

Correct. The only real adjustable limit is the size of the Windows pagefile, but that one is normally dynamic. But
theremust be room for all the shared memory in it. It's not going to be there, but the space is reserved. 

That said, if you need to increase the pagefile size to accomodate your shared buffers, you likely have way too large
valuefor shared buffers. 

/Magnus


Re: System V IPC on Windows

From
Lee Keel
Date:
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
> owner@postgresql.org] On Behalf Of Magnus Hagander
> Sent: Thursday, November 08, 2007 12:47 AM
> To: Tom Lane
> Cc: Kevin Neufeld; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] System V IPC on Windows
>
>  > > Does anyone know how to adjust the IPC settings in Windows?
> >
> > There aren't any such settings in Windows, AFAIK.
>
> Correct. The only real adjustable limit is the size of the Windows
> pagefile, but that one is normally dynamic. But there must be room for all
> the shared memory in it. It's not going to be there, but the space is
> reserved.
>
> That said, if you need to increase the pagefile size to accomodate your
> shared buffers, you likely have way too large value for shared buffers.
>
> /Magnus
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
[Lee Keel]

What if the page file exceeds the shared_buffers, but you can't increase the
shared buffers to a larger amount?  For example, page file is set to be
between 500MB and 10GB, but you can't set the shared_buffers to more than
1200MB.  If set to 1300MB or higher then service will not start.

Please see "GEOS union() error" thread for more details.

Thanks,
Lee
This email and any files transmitted with it are confidential and intended solely for the use of the individual or
entityto whom they are addressed. If you have received this email in error please notify the sender. This message
containsconfidential information and is intended only for the individual named. If you are not the named addressee you
shouldnot disseminate, distribute or copy this e-mail. 

Re: System V IPC on Windows

From
Kevin Neufeld
Date:
That makes sense, thanx.

Another individual was having problems adjusting the shared_memory
settings higher than 1.2GB on a 8GB 64bit machine running Vista.
Whenever he would adjust higher than that, the postgresql service
wouldn't start throwing some kind of error.  In linux, one would simple
adjust the SHMMAX settings.  If there's no such setting in Windows, then
the problem must lie somewhere else.

On a side, the docs could be a little more clear on this.
(http://www.postgresql.org/docs/8.2/static/kernel-resources.html)
The only reference to Windows says "(For the Windows port, PostgreSQL
provides its own replacement implementation of these facilities)".

Cheers,
Kevin

Magnus Hagander wrote:
>  > > Does anyone know how to adjust the IPC settings in Windows?
>
>> There aren't any such settings in Windows, AFAIK.
>>
>
> Correct. The only real adjustable limit is the size of the Windows pagefile, but that one is normally dynamic. But
theremust be room for all the shared memory in it. It's not going to be there, but the space is reserved. 
>
> That said, if you need to increase the pagefile size to accomodate your shared buffers, you likely have way too large
valuefor shared buffers. 
>
> /Magnus
>

Re: System V IPC on Windows

From
Kevin Neufeld
Date:
>>  > > Does anyone know how to adjust the IPC settings in Windows?
>>
>>> There aren't any such settings in Windows, AFAIK.
>>>
>> Correct. The only real adjustable limit is the size of the Windows
>> pagefile, but that one is normally dynamic.
>>
> [Lee Keel]
>
> What if the page file exceeds the shared_buffers, but you can't increase the
> shared buffers to a larger amount?  For example, page file is set to be
> between 500MB and 10GB, but you can't set the shared_buffers to more than
> 1200MB.  If set to 1300MB or higher then service will not start.
>
> Please see "GEOS union() error" thread for more details.
>
> Thanks,
> Lee
>
(In the postgis-users list
http://postgis.refractions.net/pipermail/postgis-users/2007-November/017616.html)

-- Kevin

Re: System V IPC on Windows

From
Magnus Hagander
Date:
Lee Keel wrote:
>> -----Original Message-----
>> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
>> owner@postgresql.org] On Behalf Of Magnus Hagander
>> Sent: Thursday, November 08, 2007 12:47 AM
>> To: Tom Lane
>> Cc: Kevin Neufeld; pgsql-general@postgresql.org
>> Subject: Re: [GENERAL] System V IPC on Windows
>>
>>  > > Does anyone know how to adjust the IPC settings in Windows?
>>> There aren't any such settings in Windows, AFAIK.
>> Correct. The only real adjustable limit is the size of the Windows
>> pagefile, but that one is normally dynamic. But there must be room for all
>> the shared memory in it. It's not going to be there, but the space is
>> reserved.
>>
>> That said, if you need to increase the pagefile size to accomodate your
>> shared buffers, you likely have way too large value for shared buffers.
>>
>> /Magnus
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 5: don't forget to increase your free space map settings
> [Lee Keel]
>
> What if the page file exceeds the shared_buffers, but you can't increase the
> shared buffers to a larger amount?  For example, page file is set to be
> between 500MB and 10GB, but you can't set the shared_buffers to more than
> 1200MB.  If set to 1300MB or higher then service will not start.

Have you measured any performance at all on this? The general
recommendation is to have a *small* shared_buffers on Widnows. >1Gb is
likely way too large - try something much smaller unless you have
benchmarks showing that this is helping you.

//Magnus

Re: System V IPC on Windows

From
Magnus Hagander
Date:
Kevin Neufeld wrote:
> That makes sense, thanx.
> Another individual was having problems adjusting the shared_memory
> settings higher than 1.2GB on a 8GB 64bit machine running Vista.

Pg on win32 is 32-bit. It has a total address space of 2Gb, minus the OS
overhead, minus the code, minus local memory etc. You're just not going
to fit that much in the address space.

There are fixes to reduce the memory usage of the postmaster (which is
likely what runs out first, unless you have a large work_mem) in 8.3,
but you're still right up against the wall with that large
shared_buffers. Plus, as I said in my other email, you're likely not
seeing any performance gain from such a large shared_buffers anyway. If
you are, you're seeing something new, and we definitely need to find out
why.


//Magnus


Re: System V IPC on Windows

From
Lee Keel
Date:
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
> owner@postgresql.org] On Behalf Of Magnus Hagander
> Sent: Thursday, November 08, 2007 1:30 PM
> To: Kevin Neufeld
> Cc: Tom Lane; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] System V IPC on Windows
>
> Pg on win32 is 32-bit. It has a total address space of 2Gb, minus the OS
> overhead, minus the code, minus local memory etc. You're just not going
> to fit that much in the address space.
>
> There are fixes to reduce the memory usage of the postmaster (which is
> likely what runs out first, unless you have a large work_mem) in 8.3,
> but you're still right up against the wall with that large
> shared_buffers. Plus, as I said in my other email, you're likely not
> seeing any performance gain from such a large shared_buffers anyway. If
> you are, you're seeing something new, and we definitely need to find out
> why.
>
>
> //Magnus
>
>
[Lee Keel]

I can't do any benchmarks because I keep getting errors.  But I have dropped
this value down and I am not getting the out of memory errors any more.  I
was trying to solve other problems by bumping this way up but it seemed to
just cause more problems.  I found several things in documentation that says
that bumping the shared_buffers\work_mem up to over 1gb was fine.  Is that
strictly for linux boxes?

-LK
This email and any files transmitted with it are confidential and intended solely for the use of the individual or
entityto whom they are addressed. If you have received this email in error please notify the sender. This message
containsconfidential information and is intended only for the individual named. If you are not the named addressee you
shouldnot disseminate, distribute or copy this e-mail. 

Re: System V IPC on Windows

From
Magnus Hagander
Date:
Lee Keel wrote:
>> -----Original Message-----
>> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
>> owner@postgresql.org] On Behalf Of Magnus Hagander
>> Sent: Thursday, November 08, 2007 1:30 PM
>> To: Kevin Neufeld
>> Cc: Tom Lane; pgsql-general@postgresql.org
>> Subject: Re: [GENERAL] System V IPC on Windows
>>
>> Pg on win32 is 32-bit. It has a total address space of 2Gb, minus the OS
>> overhead, minus the code, minus local memory etc. You're just not going
>> to fit that much in the address space.
>>
>> There are fixes to reduce the memory usage of the postmaster (which is
>> likely what runs out first, unless you have a large work_mem) in 8.3,
>> but you're still right up against the wall with that large
>> shared_buffers. Plus, as I said in my other email, you're likely not
>> seeing any performance gain from such a large shared_buffers anyway. If
>> you are, you're seeing something new, and we definitely need to find out
>> why.
>>
>>
>> //Magnus
>>
>>
> [Lee Keel]
>
> I can't do any benchmarks because I keep getting errors.  But I have dropped
> this value down and I am not getting the out of memory errors any more.  I
> was trying to solve other problems by bumping this way up but it seemed to

You could try benchmarking in-between levels, like comparing 128Mb to
512Mb. A couple of those should show you a trend.


> just cause more problems.  I found several things in documentation that says
> that bumping the shared_buffers\work_mem up to over 1gb was fine.  Is that
> strictly for linux boxes?

No, it's valid for most platforms that aren't Windows. But it's
generally not valid for Windows.

//Magnus