how random is Math.random() in java across different jvms or different machines
- by user881480
I have a large distributed program across many different physical servers, each program spawns many threads, each thread use Math.random() in its operations to draw a piece from many common resource pools.
The goal is to utilize the pools evenly across all operations. Sometimes, it doesn't appear so random by looking at a snapshot on a resource pool to see which pieces it's getting at that instant (it might actually be, but it's hard to measure and find out for sure).
Is there something that's better than Math.random() and performs just as good (not much worse at least)?