In 1.4 and later, MaxNewSize has been effectively set to infinity, and NewRatio can be used instead to set the value of the new generation. NewRatio (the ratio between the young/old generations) has values of 2 on Sparc Server, 12 on client Intel, and 8 everywhere else, as you can quickly determine, this is superseded by MaxNewSize's defaults (rendering NewRatio ineffective for even moderately sized heaps). For 1.3, MaxNewSize is set to 32mb on Sparc, 2.5mb on Intel based machines. Which will dedicate 1/3rd of the memory to eden. If you currently invoke with something like: For most programs, collecting eden is much faster than other generations because most objects die young. For some applications a very large eden helps, for others it will increase the times of minor collections. If your application requires more memory than you can adjust the size of the eden (young generation space) with -XX:NewSize=. A larger heap will cause garbage collection pauses to increase because there is more heap to scan. Next, you might try decreasing the amount of heap used. For most programs this results in shorter pauses, although throughput is usually worse. This uses the incremental garbage collection algorithm, which attempts to collect a fraction of the heap instead of the entire thing at once. There are several things to try in this arena.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |