• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java's Memory Model?  RSS feed

 
Michael Something
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would appreciate some help regarding Java's memory model.

At times I get


There I am creating a new socket for my http client:


As you can see above I already introduced something some logging when this OutOfMemory occurs. The memory looks like this at that point of time:

heap: init = 0(0K) used = 28684528(28012K) committed = 45522944(44456K) max = 166526976(162624K) commited usage=63% max usage=17%
non heap: init = 8552448(8352K) used = 41372552(40402K) committed = 42303488(41312K) max = 100663296(98304K) commited usage=97% max usage=41%

Code Cache - NOW : init = 163840(160K) used = 6639296(6483K) committed = 6651904(6496K) max = 33554432(32768K) commited usage=99% max usage=19%
Code Cache - COLLECTION : null
Eden Space - NOW : init = 524288(512K) used = 1419056(1385K) committed = 2949120(2880K) max = 10354688(10112K) commited usage=48% max usage=13%
Eden Space - COLLECTION : init = 524288(512K) used = 0(0K) committed = 2949120(2880K) max = 10354688(10112K) commited usage=0% max usage=0%
Survivor Space - NOW : init = 65536(64K) used = 67472(65K) committed = 327680(320K) max = 1245184(1216K) commited usage=20% max usage=5%
Survivor Space - COLLECTION : init = 65536(64K) used = 67472(65K) committed = 327680(320K) max = 1245184(1216K) commited usage=20% max usage=5%
Tenured Gen - NOW : init = 1441792(1408K) used = 27198000(26560K) committed = 42246144(41256K) max = 154927104(151296K) commited usage=64% max usage=1
7%
Tenured Gen - COLLECTION : init = 1441792(1408K) used = 16836616(16442K) committed = 28061696(27404K) max = 154927104(151296K) commited usage=59% max
usage=10%
Perm Gen - NOW : init = 8388608(8192K) used = 34733256(33919K) committed = 35651584(34816K) max = 67108864(65536K) commited usage=97% max usage=51%
Perm Gen - COLLECTION : init = 8388608(8192K) used = 33552040(32765K) committed = 33554432(32768K) max = 67108864(65536K) commited usage=99% max usage
=49%


So I am not really a professional regarding Java's memory model, but why does the VM not just increase the commited space since max space is not full?

Are there any tuning options instead of increasing the total memory, which is not an option in my case?

Thanks for your help!
Michael
 
Brett Maclean
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This article may be of some help (it's an interesting read anyway :-) Java Memory Mgmt - IBM DeveloperWorks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!