I introduced the limit of 50 Mb for chunks in method GarbageUtils.eatMemory. Changesets: http://vmsqe-app.russia.sun.com/hg/sqe/vm/7/ws_int_spb/vm/diff/aea0db5111b0/src/nsk/share/gc/gp/GarbageUtils.java and http://vmsqe-app.russia.sun.com/hg/sqe/vm/8/ws_int_spb/vm/diff/c7cdd21c116d/src/nsk/share/gc/gp/GarbageUtils.java
My intention was to avoid allocation failures on machines with huge heap (huge heap consequences to huge chunk), followed by long garbage collection. Tests timed out as a result. In future 50 Mb limit may become not appropriate and require revision.
It might be useful to introduce more sophisticated and smart algorithm of calculating initial chunk as:
- we want to eat memory fast
- we don't want to get allocation failures followed by gc that defers this allocation by about minute.
Further research required.
My intention was to avoid allocation failures on machines with huge heap (huge heap consequences to huge chunk), followed by long garbage collection. Tests timed out as a result. In future 50 Mb limit may become not appropriate and require revision.
It might be useful to introduce more sophisticated and smart algorithm of calculating initial chunk as:
- we want to eat memory fast
- we don't want to get allocation failures followed by gc that defers this allocation by about minute.
Further research required.