[mapguide-users] RenderMap: MgOutOfMemoryException
Jackie Ng
jumpinjackie at gmail.com
Thu Aug 27 04:44:32 PDT 2020
I can tell you right now, if you're expecting a 80MB png to be rendered, it
will not take 80MB of memory to render said PNG. It takes much much more
memory.
I did a little test just to see how much memory is being used to render the
Sheboygan sample map at full map extents with an image size of 9922 x 14302
pixels.
~610MB memory is allocated to set up the raw image buffer for the AGG
renderer
Another ~670MB memory is allocated to set up the PNG pixel buffer for
converting the AGG renderer result to PNG.
The resulting PNG image is ~33MB
So at least ~1.24GB of memory is used to produce a 9922 x 14302 PNG image
that is 33MB.
This does not include any extra memory allocations from whatever user code
that is calling this RenderMap API.
This is with the Sheboygan map that only has 10 layers.
Take the numbers outlined here and scale appropriately to your particular
map. Not the most scientific method, but at least it will give you a rough
number in terms of memory usage.
Are you on 64-bit MapGuide at least? If so, how much physical RAM does that
machine have? You probably need to throw more RAM at it if you're going to
be plotting images of this size on a regular basis.
If it's 32-bit MapGuide, forget it. Windows only allows a 32-bit process to
address 2GB of memory (ref:
https://stackoverflow.com/questions/639540/how-much-memory-can-a-32-bit-process-access-on-a-64-bit-operating-system)
- Jackie
--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
More information about the mapguide-users
mailing list