RFR [XS] : 8204598 : add more thread-related system settings info to hs_error file on Linux

Thomas Stüfe thomas.stuefe at gmail.com
Fri Jun 8 09:25:36 UTC 2018


Hi David,

On Fri, Jun 8, 2018 at 10:09 AM, David Holmes <david.holmes at oracle.com> wrote:
> Hi Matthias,
>
> This seems okay.
>
> Not sure how useful max_map_count may be.
>

You'd be surprised :) Customers like to tweak this setting in the
assumption that this would limit memory consumption. We saw limits as
low as 1000 in the field.

If you hit that limit, weird things happen. In 80% of all cases this
means metaspace allocation will fail, since metaspace uses a lot of
small mappings. But you also could fail e.g. to load a shared library.

..Thomas

> Thanks,
> David
>
>
> On 8/06/2018 6:04 PM, Baesken, Matthias wrote:
>>
>> Hi could you please review  this small Linux related change ?
>>
>> In linux os::print_os_info ,  I  print additional  info about a number of
>> system parameters influencing thread creation on Linux.
>>
>> We noticed the influence of these parameters when looking into an
>> application creating over 10.000 threads on Linux at the same time; there we
>> got an OOM : unable to create new native thread
>> which was caused by a failing pthread_create (error EAGAIN) .
>>
>> The machine had plenty of memory, so we looked into various kernel params
>> and in the end noticed that /proc/sys/kernel/pid_max was too low.
>> The other added parameters "threads-max" and "max_map_count" are also
>> known to be related to problems when running with high thread numbers, so I
>> add them too .
>>
>>
>>
>> Webrev :
>>
>> http://cr.openjdk.java.net/~mbaesken/webrevs/8204598/
>>
>> Bug :
>>
>> https://bugs.openjdk.java.net/browse/JDK-8204598
>>
>>
>> Thanks, Matthias
>>
>


More information about the hotspot-dev mailing list