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

Improve UUID.randomUUID performance with bulk/scalable PRNG access

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 17, 20, 21
    • core-libs

      UUID is very important class that is used to track identities of objects in large scale systems. On some of our systems, `UUID.randomUUID` takes >1% of total CPU time, and is frequently a scalability bottleneck due to SecureRandom synchronization.

      The major issue with UUID code itself is that it reads from the single SecureRandom instance by 16 bytes. So the heavily contended SecureRandom is bashed with very small requests. This also has a chilling effect on other users of SecureRandom, when there is a heavy UUID generation traffic.

      We can improve this by doing the bulk reads from the backing SecureRandom and possibly striping the reads across many instances of it.

      Draft PR: https://github.com/openjdk/jdk/pull/14135

            Unassigned Unassigned
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: