java - Memory running out side of Xmx and Xms -


i have run issue java application wrote causing hardware performance issues. problem (i'm certain), few of machines i'm running application on have 1gb of memory. when start java application, i"m setting heap size -xms 512m -xmx 1024m.

my first question, assumption correct cause performance problems because i'm allocating of machines memory java heap?

this leads question. i'm running jconsole on app , monitoring apps memory usage. i'm seeing app consumes 30mb @ startup, gets 150mb , garbage collector runs , goes down 30mb. i'm seeing using top on pid application starts using 6% memory climbs 20%. not understand this. why 20% memory usage when i'm allocating 1gb it. shouldn't go 100%. also, why using memory (20%) when doesn't appear app ever uses more 150mb?

i think pretty obvious need adjust xms , xmx , should resolve issue, i'm trying understand better happening.

two possibilities memory use:

your app not use memory

or

your app not use memory fast enough.

what happens:

the garbage collector has several points execute:

  1. just scheduled: clean easy remove objects

  2. full collection: runs when hit set memory limits.

if options 1, general lower impact quick collection, can keep memory use under control, not hit full collection unless jvm gc options set run full on schedule.

with application start setting lower xmx/xms values more guaranteed resources left os, , maybe paging prevented.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -