The following table shows the values that are used when -XX:+UseContainerSupport is set:
Less than 1 GB 50% <size>
1 GB - 2 GB <size> - 512 MB
Greater than 2 GB 75% <size>
The default heap size is capped at 25 GB
The default heap size for containers takes affect only when the following conditions are met:
The application is running in a container environment.
The memory limit for the container is set.
The -XX:+UseContainerSupport option is set, which is the default behavior.
When you pipe the output, ls acts differently.
This fact is hidden away in the info documentation:
If standard output is a terminal, the output is in columns (sorted vertically) and control characters are output as question marks; otherwise, the output is listed one per line and control characters are output as-is.
To prove it, try running
ls
and then
ls | less
S. Adafre, and M. de Rijke. Proceedings of the ACL Workshop on Feature Engineering for Machine Learning in Natural Language Processing, page 9--16. Stroudsburg, PA, USA, Association for Computational Linguistics, (2005)
E. Agirre, and A. Soroa. Proceedings of the Fourth International Workshop on Semantic Evaluations (SemEval-2007), page 7--12. Prague, Czech Republic, Association for Computational Linguistics, (June 2007)
E. Alfonseca, K. Filippova, J. Delort, and G. Garrido. Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics: Short Papers - Volume 2, page 54--59. Stroudsburg, PA, USA, Association for Computational Linguistics, (2012)
J. Artiles, E. Amigó, and J. Gonzalo. Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing: Volume 2 - Volume 2, page 534--542. Stroudsburg, PA, USA, Association for Computational Linguistics, (2009)
M. Banko, M. Cafarella, S. Soderland, M. Broadhead, and O. Etzioni. Proceedings of the 20th International Joint Conference on Artifical Intelligence, page 2670--2676. San Francisco, CA, USA, Morgan Kaufmann Publishers Inc., (2007)