Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-09-04 Thread David Schlosnagle
On Thu, 1 Jun 2023 09:37:29 GMT, Aleksey Shipilev wrote: >> UUID is the 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 >> `Se

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-06-01 Thread Andrei Pangin
On Thu, 1 Jun 2023 09:37:29 GMT, Aleksey Shipilev wrote: >> UUID is the 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 >> `Se

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-06-01 Thread Aleksey Shipilev
On Thu, 1 Jun 2023 12:59:14 GMT, Brett Okken wrote: >> Aleksey Shipilev has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains 13 commits: >> >> - Revert test changes >> - Merge branch 'master' into JDK-8308804-uuid-buffers >> - Simpl

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-06-01 Thread Brett Okken
On Thu, 1 Jun 2023 09:37:29 GMT, Aleksey Shipilev wrote: >> UUID is the 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 >> `Se

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-06-01 Thread Aleksey Shipilev
> UUID is the 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 cod

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v6]

2023-05-26 Thread Aleksey Shipilev
> UUID is the 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 cod

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v5]

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 15:30:29 GMT, Roger Riggs wrote: >> Yes, I used them for testing, but left them in, because it would be >> convenient to have them around for field tuning and diagnostics. This would >> require a CSR, right? > > I don't think there is a strong case for adding the system prop

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v5]

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 15:30:29 GMT, Roger Riggs wrote: >> Yes, I used them for testing, but left them in, because it would be >> convenient to have them around for field tuning and diagnostics. This would >> require a CSR, right? > > I don't think there is a strong case for adding the system prop

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v5]

2023-05-26 Thread Aleksey Shipilev
> UUID is the 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 cod

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v4]

2023-05-26 Thread Roger Riggs
On Thu, 25 May 2023 14:04:35 GMT, Aleksey Shipilev wrote: >> src/java.base/share/classes/java/util/UUID.java line 149: >> >>> 147: } else { >>> 148: try { >>> 149: return SecureRandom.getInstance(PRNG_NAME); >> >> Part of the change here is that t

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v3]

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 12:01:50 GMT, Andrei Pangin wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fine-tune exceptions > > src/java.base/share/classes/java/util/UUID.java line 226: > >> 224: // s

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v4]

2023-05-26 Thread Aleksey Shipilev
> UUID is the 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 cod

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v3]

2023-05-26 Thread Andrei Pangin
On Fri, 26 May 2023 11:43:11 GMT, Aleksey Shipilev wrote: >> UUID is the 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 >> `S

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v3]

2023-05-26 Thread Andrei Pangin
On Fri, 26 May 2023 08:36:46 GMT, Aleksey Shipilev wrote: >> src/java.base/share/classes/java/util/UUID.java line 224: >> >>> 222: // Try to pull the UUID from the current buffer at >>> current position. >>> 223: if (stamp != 0) { >>> 224:

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v2]

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 11:24:10 GMT, Daniel Fuchs wrote: >> Aleksey Shipilev has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Handle privileged properties >> - Use ByteArray to convert. Do version/variant preparations straight on >> loca

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v3]

2023-05-26 Thread Aleksey Shipilev
> UUID is the 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 cod

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v2]

2023-05-26 Thread Daniel Fuchs
On Fri, 26 May 2023 09:51:47 GMT, Aleksey Shipilev wrote: >> UUID is the 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 >> `S

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v2]

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 08:37:49 GMT, Aleksey Shipilev wrote: >> `jdk.internal.util.ByteArray` has VarHandle-based methods ready for that > > Yes, I have that optimization in the pipeline, and wanted to do so > separately. I can still fold it here, let me see. Did so in new commit. -

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v2]

2023-05-26 Thread Aleksey Shipilev
On Thu, 25 May 2023 12:17:27 GMT, Alan Bateman wrote: >> Aleksey Shipilev has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Handle privileged properties >> - Use ByteArray to convert. Do version/variant preparations straight on >> loca

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v2]

2023-05-26 Thread Aleksey Shipilev
> UUID is the 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 cod

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 08:39:10 GMT, Aleksey Shipilev wrote: >> src/java.base/share/classes/java/util/UUID.java line 260: >> >>> 258: buf[c + 8] &= 0x3f; /* clear variant*/ >>> 259: buf[c + 8] |= (byte) 0x80; /* set to IETF >>> variant */

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 00:16:19 GMT, Andrei Pangin wrote: >> UUID is the 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 >> `Secu

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 06:47:29 GMT, Hannes Greule wrote: >> src/java.base/share/classes/java/util/UUID.java line 286: >> >>> 284: long lsb = 0; >>> 285: for (int i = start; i < start + 8; i++) { >>> 286: msb = (msb << 8) | (data[i] & 0xff); >> >> Can we use VarHandle/B

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 00:50:04 GMT, Brett Okken wrote: >> UUID is the 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 >> `Secure

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 00:13:57 GMT, Andrei Pangin wrote: >> UUID is the 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 >> `Secu

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-25 Thread Hannes Greule
On Thu, 25 May 2023 23:54:14 GMT, Andrei Pangin wrote: >> UUID is the 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 >> `Secu

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-25 Thread Brett Okken
On Wed, 24 May 2023 19:36:44 GMT, Aleksey Shipilev wrote: > UUID is the 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 > `Secur

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-25 Thread Andrei Pangin
On Wed, 24 May 2023 19:36:44 GMT, Aleksey Shipilev wrote: > UUID is the 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 > `Secur

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-25 Thread Aleksey Shipilev
On Thu, 25 May 2023 14:01:43 GMT, Alan Bateman wrote: >> UUID is the 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 >> `Secur

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-25 Thread Alan Bateman
On Wed, 24 May 2023 19:36:44 GMT, Aleksey Shipilev wrote: > UUID is the 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 > `Secur

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-25 Thread Alan Bateman
On Wed, 24 May 2023 19:36:44 GMT, Aleksey Shipilev wrote: > UUID is the 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 > `Secur

RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-25 Thread Aleksey Shipilev
UUID is the 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