Win32: Minimising desktop heap usage

From: Dave Page <dpage(at)postgresql(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Subject: Win32: Minimising desktop heap usage
Date: 2007-10-23 15:08:20
Message-ID: 471E0E64.8050506@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

A discussion on -general has been ongoing in which is was discovered
that 8.3 can exhaust the desktop heap allocated to a service with ~45
connections at which point the server will crash.

Desktop heap is allocated by user32.dll and shell32 on a per-process
basis from a 512KB pool for a non-interactive logon (on XP) and 3072KB
pool for an interactive logon. The attached patch removes our direct
dependencies on these DLLs, reducing the overhead from around 9.7KB per
backend to around 3.5KB. This is back in the range we had with 8.2.

Unfortunately, there are still indirect dependencies on user32.dll which
I don't think we'll be able to do anything about. If desktop heap is
still exhausted with larger installations, the allocated heap size can
be increased in the registry.

See
http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx
for more info.

Regards, Dave

Attachment Content-Type Size
desktop_heap.patch text/x-diff 3.1 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-10-23 15:30:03 Re: Win32: Minimising desktop heap usage
Previous Message Gokulakannan Somasundaram 2007-10-23 13:52:12 Re: [PATCHES] Including Snapshot Info with Indexes