Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8315702

jcmd Thread.dump_to_file slow with millions of virtual threads

    XMLWordPrintable

Details

    • b15

    Backports

      Description

        HotSpotDiagnosticMXBean.dumpThreads and jcmd Thread.dump_to_file is slow when there are millions of threads.

        The performance can be improved significantly if the dump of the thread info and stack trace is done with println instead of format, and the the file stream is wrapped with a buffered stream (the buffered writer used by PrintStream is not sufficient here).

        Reported here:
        https://mail.openjdk.org/pipermail/loom-dev/2023-September/006146.html

        Attachments

          Issue Links

            Activity

              People

                alanb Alan Bateman
                alanb Alan Bateman
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: