System V IPC on Windows

Started by Kevin Neufeldover 18 years ago10 messagesgeneral
Jump to latest
#1Kevin Neufeld
kneufeld@refractions.net

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kevin Neufeld (#1)
Re: System V IPC on Windows

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

#3Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#2)
Re: 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

#4Lee Keel
lee.keel@uai.com
In reply to: Magnus Hagander (#3)
Re: System V IPC on Windows

-----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 entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.

#5Kevin Neufeld
kneufeld@refractions.net
In reply to: Magnus Hagander (#3)
Re: System V IPC on Windows

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:

Show quoted text

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

#6Kevin Neufeld
kneufeld@refractions.net
In reply to: Lee Keel (#4)
Re: 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.

[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

#7Magnus Hagander
magnus@hagander.net
In reply to: Lee Keel (#4)
Re: System V IPC on Windows

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

#8Magnus Hagander
magnus@hagander.net
In reply to: Kevin Neufeld (#5)
Re: System V IPC on Windows

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

#9Lee Keel
lee.keel@uai.com
In reply to: Magnus Hagander (#8)
Re: System V IPC on Windows

-----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 entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.

#10Magnus Hagander
magnus@hagander.net
In reply to: Lee Keel (#9)
Re: System V IPC on Windows

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