Setting Metaspace Size
In addition to heap space, the JVM allocates multiple chunks of memory for things that need to be stored off heap. This includes I/O buffers, thread stacks, compiled code, and metaspace. The total memory footprint of a JVM process is the sum of the memory footprint for each of these components.
Metaspace contains metadata about the application the JVM is running. It contains class definitions, method definitions, and other things like that. The more classes you load into your app, the larger metaspace will be. Most JVM processes require only 40 to 50 megabytes for metaspace, but JRuby must load the entire Ruby standard library into memory at runtime, which moves its grand total a bit higher. A typical JRuby on Rails ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access