logo separator

[mkgmap-dev] Error in memory calculation

From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri Feb 7 09:55:40 GMT 2020

Hi Ticker,

I think the problem occurs when the G1 garbage collector is active and no
garbage collection was performed. In this case memoryUsage.getMax() may
return -1 while memoryUsage.getUsed() returns a positive value.
In Java 1.8 you can force the usage of G1 with -XX:+UseG1GC .
So, this is really a very special case. It happened for John Thorne who is
using several rather small *.mp files as input, but I think it can also
occur for others when the first input file is a typ file in *.txt format.

Please review my patch:
mem.patch <http://gis.19327.n8.nabble.com/file/t318326/mem.patch>  

Gerd


Ticker Berkin wrote
> Hi Gerd
> 
> I don't have a 64bit environment or that much memory. In my normal
> environment, I get:
> 
> $ java -Xms1500M -Xmx1540M -jar ../mkgmap.trunk/mkgmap.jar \
>   dummy.osm dummy.osm dummy.osm
> Time started: Wed Feb 05 12:56:28 GMT 2020
> Setting max-jobs to 4
> Number of MapFailedExceptions: 0
> Number of ExitExceptions: 0
> Time finished: Wed Feb 05 12:56:29 GMT 2020
> Total time taken: 1 second
> 
> -Xmx1540M is the maximum value that allows Java to start up on my
> machine.
> 
> With a newer version I loaded in October, but it didn't have any
> obvious advantages:
> 
> $ /opt/jre1.8.0_231/bin/java -Xms1500M -Xmx1540M \
>   -jar ../mkgmap.trunk/mkgmap.jar \
>   dummy.osm dummy.osm dummy.osm
> Time started: Wed Feb 05 12:58:29 GMT 2020
> Setting max-jobs to 4
> Number of MapFailedExceptions: 0
> Number of ExitExceptions: 0
> Time finished: Wed Feb 05 12:58:30 GMT 2020
> Total time taken: 1 second
> 
> Ticker
> 
> On Fri, 2020-01-31 at 16:15 +0000, Gerd Petermann wrote:
>> please try this command with openjdk 11 or 13 64Bit:
>> java -Xms4G -Xmx10G -jar mkgmap.jar f:\osm\dummy.osm f:\osm\dummy.osm
>> f:\osm\dummy.osm
>> This is what I get:
>> Time started: Fri Jan 31 17:12:53 CET 2020
>> Setting max-jobs to 1
>> Number of MapFailedExceptions: 0
>> To reduce the run time, consider increasing the amnount of memory
>> available for use by mkgmap by using the Java -Xmx flag to set the
>> memory to more than 41000 MB, providing this is less than the amount
>> of physical memory installed.
>> Number of ExitExceptions: 0
>> Time finished: Fri Jan 31 17:12:54 CET 2020
>> Total time taken: 1 second
> _______________________________________________
> mkgmap-dev mailing list

> mkgmap-dev at .org

> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev





--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html


More information about the mkgmap-dev mailing list