Play 2.5 JVM options (-J-Xms4048m -J-Xmx4048m -J-server) are ignored on production

188 views
Skip to first unread message

Michal Zubkowicz

unread,
Jul 5, 2016, 7:26:16 AM7/5/16
to play-framework
On our production system Java Options like  -J-Xms4048m -J-Xmx4048m -J-server are ignored and application after some time grows up to 6GB of ram.
There is a bug or something I'm doing wrong here?

Michal Zubkowicz

unread,
Jul 5, 2016, 9:07:38 AM7/5/16
to play-framework
Maybe it's not a case of heap size? Heap size 4gb, but Play Application can still use more.

Heap Configuration:
   MinHeapFreeRatio         = 0
   MaxHeapFreeRatio         = 100
   MaxHeapSize              = 4244635648 (4048.0MB)
   NewSize                  = 1414529024 (1349.0MB)
   MaxNewSize               = 1414529024 (1349.0MB)
   OldSize                  = 2830106624 (2699.0MB)
   NewRatio                 = 2
   SurvivorRatio            = 8
   MetaspaceSize            = 21807104 (20.796875MB)
   CompressedClassSpaceSize = 1073741824 (1024.0MB)
   MaxMetaspaceSize         = 17592186044415 MB
   G1HeapRegionSize         = 0 (0.0MB)
 
Heap Usage:
PS Young Generation
Eden Space:
   capacity = 552075264 (526.5MB)
   used     = 166902448 (159.1705780029297MB)
   free     = 385172816 (367.3294219970703MB)
   30.231828680518458% used
From Space:
   capacity = 438304768 (418.0MB)
   used     = 0 (0.0MB)
   free     = 438304768 (418.0MB)
   0.0% used
To Space:
   capacity = 424148992 (404.5MB)
   used     = 0 (0.0MB)
   free     = 424148992 (404.5MB)
   0.0% used
PS Old Generation
   capacity = 2830106624 (2699.0MB)
   used     = 2829590112 (2698.5074157714844MB)
   free     = 516512 (0.492584228515625MB)
   99.9817493801958% used


Will Sargent

unread,
Jul 5, 2016, 12:20:50 PM7/5/16
to play-fr...@googlegroups.com
You should use a profiler on your system to see what's chewing up memory like that.  Play can run with very small heaps, as it's stateless and so mostly has young objects.   In your case, you have PS Old Generation taking up 99% of space, so you have a memory leak somewhere.

Will.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/ac2ce622-697b-42fe-9515-cbf274626344%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michal Zubkowicz

unread,
Jul 5, 2016, 12:50:18 PM7/5/16
to play-framework
Thanks for suggestion.

Michal Zubkowicz

unread,
Jul 6, 2016, 8:15:54 AM7/6/16
to play-framework
It was wrong usage of Akka Scheduler, we had 40 000 instances of same class.


W dniu wtorek, 5 lipca 2016 18:20:50 UTC+2 użytkownik Will Sargent napisał:
Reply all
Reply to author
Forward
0 new messages