2011/6/8 Andrés Maneiro <[email protected]>:
> Hello Danielle, have you got time to review that? I'm stuck with this
> problem yet, and have no hipothesis left for what could be happening.
I think I've found what is going on.
First off, tried with my GeoServer 2.1 on Linux, found no problems.
Then for the kicks of it I used a very strapped version of it, giving it
only 64MB of memory, and boom, OOM.
If you have a number of these images the problem will surely happen
often. The image has a degenerate structure that makes it hard to
deal with it.
GeoServer, for performance reasons, caches the image metadata, which
provide information about the image structure, such as the tile structure,
where each tile starts in the file and the like.
These image has a metadata which is massive, and results in allocating
a ton of memory for it. What I see in a memory dump:
9: 88107 4933992 javax.imageio.metadata.IIOMetadataNode
5MB only of the IIOMetadataNode class, and we still have to add its
contents, wow.
Running a gdalinfo on the image I see:
Driver: GTiff/GeoTIFF
Files: 153146.tif
Size is 12249, 14608
Coordinate System is:
PROJCS["ED50 / UTM zone 29N",
GEOGCS["ED50",
DATUM["European_Datum_1950",
SPHEROID["International 1924",6378388,297.0000000000014,
AUTHORITY["EPSG","7022"]],
AUTHORITY["EPSG","6230"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4230"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","23029"]]
Origin = (568623.530999999959022,4808183.230000000447035)
Pixel Size = (0.031273881300000,-0.031274404100000)
Metadata:
TIFFTAG_SOFTWARE=IMAGINE TIFF Support
Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved
@(#)$RCSfile: etif.c $ $Revision: 1.10.1.9.1.9.2.11 $ $Date:
2004/09/15 18:42:01EDT $
TIFFTAG_XRESOLUTION=1
TIFFTAG_YRESOLUTION=1
TIFFTAG_RESOLUTIONUNIT=1 (unitless)
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 568623.531, 4808183.230) ( 8d 9' 8.23"W, 43d25'21.41"N)
Lower Left ( 568623.531, 4807726.374) ( 8d 9' 8.44"W, 43d25' 6.60"N)
Upper Right ( 569006.605, 4808183.230) ( 8d 8'51.20"W, 43d25'21.28"N)
Lower Right ( 569006.605, 4807726.374) ( 8d 8'51.41"W, 43d25' 6.48"N)
Center ( 568815.068, 4807954.802) ( 8d 8'59.82"W, 43d25'13.94"N)
Band 1 Block=64x64 Type=Byte, ColorInterp=Palette
Image Structure Metadata:
NBITS=1
Color Table (RGB with 2 entries)
0: 0,0,0,255
1: 255,255,255,255
Two things are very wrong for this image:
- the tile structure is minuscule, resulting in well over 40000
tiles to compose the image
- there are no overviews.
I've fixed both issues with the following commands:
gdal_translate 153146.tif bw.tiff -co TILED=YES
gdaladdo -r average bw.tiff 2 4 8 16 32 64 128
With these GeoServer can handle bw.tiff even with just 64MB
of heap. You can increase the tile size (default is 256) with more
-co options, that will reduce the metadata size even more (thought
I would not go above 512 or 1024 tops), see
http://www.gdal.org/frmt_gtiff.html
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users