Having frustrated with performance on Windows box I'm wondering if it's
possible to get postgresql optimized for working without shared memory,
say in single-task mode. It looks like it's shared memory emulation on disk
(by cygipc daemon) is responsible for performance degradation.
In our project we have to use Windows for desktop application and it's
single task, so we don't need shared memory. In principle, it's possible
to hack cygipc, so it wouldn't emulate shared memory and address calls
to normal memory, but I'm wondering if it's possible from postgres side.

	Regards,
		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


Tue, 26 Feb 2002 15:52:13 +0300 (GMT)
Oleg Bartunov <oleg@sai.msu.su>
single task postgresql
Oleg Bartunov wrote:
> 
> Having frustrated with performance on Windows box I'm wondering if it's
> possible to get postgresql optimized for working without shared memory,
> say in single-task mode. It looks like it's shared memory emulation on disk
> (by cygipc daemon) is responsible for performance degradation.
> In our project we have to use Windows for desktop application and it's
> single task, so we don't need shared memory. In principle, it's possible
> to hack cygipc, so it wouldn't emulate shared memory and address calls
> to normal memory, but I'm wondering if it's possible from postgres side.
> 
>         Regards,

How does cygwin do shared memory on Windows? Windows support real shared
memory, surely the cygwin guys are using "real" shared memory. Are you sure
that this is the problem? If so, might we not be able to use a few
macros/#ifdefs to do it right?

I'll be up for that if you guys don't mind some "ifdef/endif" stuff here and
there.

Tue, 26 Feb 2002 14:27:51 -0500
mlw <markw@mohawksoft.com>
Re: single task postgresql
Oleg Bartunov <oleg@sai.msu.su> writes:
> Having frustrated with performance on Windows box I'm wondering if it's
> possible to get postgresql optimized for working without shared memory,
> say in single-task mode. It looks like it's shared memory emulation on disk
> (by cygipc daemon) is responsible for performance degradation.
> In our project we have to use Windows for desktop application and it's
> single task, so we don't need shared memory. In principle, it's possible
> to hack cygipc, so it wouldn't emulate shared memory and address calls
> to normal memory, but I'm wondering if it's possible from postgres side.

As mlw comments, that is probably not really the source of the
performance issue.  However, you should be able to hack it if you
want to check.  A standalone backend just malloc()s what would otherwise
be the shared memory area.  As a first approximation you could just fire
up a standalone backend and see if it seems any faster.

			regards, tom lane

Tue, 26 Feb 2002 18:43:56 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: single task postgresql 
On Tue, 2002-02-26 at 17:52, Oleg Bartunov wrote:
> Having frustrated with performance on Windows box I'm wondering if it's
> possible to get postgresql optimized for working without shared memory,
> say in single-task mode. It looks like it's shared memory emulation on disk
> (by cygipc daemon) is responsible for performance degradation.
> In our project we have to use Windows for desktop application and it's
> single task, so we don't need shared memory. In principle, it's possible
> to hack cygipc, so it wouldn't emulate shared memory and address calls
> to normal memory, but I'm wondering if it's possible from postgres side.

You might also be interested in hacking the threaded verion to run on
native windows without cygwin.

On Sun, 2002-01-27 at 02:19, mkscott@sacadia.com wrote:
> For anyone interested, I have posted a new version of multi-threaded
> Postgres 7.0.2 here:
> 
> http://sourceforge.net/projects/mtpgsql
> 

---------------
Hannu


27 Feb 2002 10:53:35 +0500
Hannu Krosing <hannu@krosing.net>
Re: single task postgresql
On 27 Feb 2002, Hannu Krosing wrote:

> On Tue, 2002-02-26 at 17:52, Oleg Bartunov wrote:
> > Having frustrated with performance on Windows box I'm wondering if it's
> > possible to get postgresql optimized for working without shared memory,
> > say in single-task mode. It looks like it's shared memory emulation on disk
> > (by cygipc daemon) is responsible for performance degradation.
> > In our project we have to use Windows for desktop application and it's
> > single task, so we don't need shared memory. In principle, it's possible
> > to hack cygipc, so it wouldn't emulate shared memory and address calls
> > to normal memory, but I'm wondering if it's possible from postgres side.
>
> You might also be interested in hacking the threaded verion to run on
> native windows without cygwin.

unfortunately it's based on 7.0.2 and doesn't supports dynamic function call.

>
> On Sun, 2002-01-27 at 02:19, mkscott@sacadia.com wrote:
> > For anyone interested, I have posted a new version of multi-threaded
> > Postgres 7.0.2 here:
> >
> > http://sourceforge.net/projects/mtpgsql
> >
>
> ---------------
> Hannu
>

	Regards,
		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


Wed, 27 Feb 2002 15:02:22 +0300 (GMT)
Oleg Bartunov <oleg@sai.msu.su>
Re: single task postgresql
On Tue, 26 Feb 2002, Tom Lane wrote:

> Oleg Bartunov <oleg@sai.msu.su> writes:
> > Having frustrated with performance on Windows box I'm wondering if it's
> > possible to get postgresql optimized for working without shared memory,
> > say in single-task mode. It looks like it's shared memory emulation on disk
> > (by cygipc daemon) is responsible for performance degradation.
> > In our project we have to use Windows for desktop application and it's
> > single task, so we don't need shared memory. In principle, it's possible
> > to hack cygipc, so it wouldn't emulate shared memory and address calls
> > to normal memory, but I'm wondering if it's possible from postgres side.
>
> As mlw comments, that is probably not really the source of the
> performance issue.  However, you should be able to hack it if you

earlier versions of windows doesn't have shared memory and I did see
a file on disk when run postgresql on w98. That's why I suggest it's
a source of performance drop.

> want to check.  A standalone backend just malloc()s what would otherwise
> be the shared memory area.  As a first approximation you could just fire
> up a standalone backend and see if it seems any faster.
>

thanks, it works and doesn't need shared memory, only 2 semaphors.
will investigate further.

> 			regards, tom lane
>

	Regards,
		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


Wed, 27 Feb 2002 15:09:15 +0300 (GMT)
Oleg Bartunov <oleg@sai.msu.su>
Re: single task postgresql 