I have below out put from one of VM.
So, as per link, the parallel streams use the default ForkJoinPool.commonPool
which by default has one less threads as you have processors, as returned by Runtime.getRuntime().availableProcessors()
.
If I do Runtime.getRuntime().availableProcessors()
, then it always returns 1, but looking at below output, number should have been more.
What I am missing here?
lscpu command output is :-
2019-02-05T20:20:33.813+05:30 [APP/PROC/WEB/0] [OUT] Architecture: x86_64
2019-02-05T20:20:33.813+05:30 [APP/PROC/WEB/0] [OUT] CPU op-mode(s): 32-bit, 64-bit
2019-02-05T20:20:33.813+05:30 [APP/PROC/WEB/0] [OUT] Byte Order: Little Endian
2019-02-05T20:20:33.813+05:30 [APP/PROC/WEB/0] [OUT] CPU(s): 4
2019-02-05T20:20:33.813+05:30 [APP/PROC/WEB/0] [OUT] On-line CPU(s) list: 0-3
2019-02-05T20:20:33.814+05:30 [APP/PROC/WEB/0] [OUT] Thread(s) per core: 1
2019-02-05T20:20:33.814+05:30 [APP/PROC/WEB/0] [OUT] Core(s) per socket: 1
2019-02-05T20:20:33.819+05:30 [APP/PROC/WEB/0] [OUT] Socket(s): 4
2019-02-05T20:20:33.819+05:30 [APP/PROC/WEB/0] [OUT] NUMA node(s): 1
2019-02-05T20:20:33.819+05:30 [APP/PROC/WEB/0] [OUT] Vendor ID: GenuineIntel
2019-02-05T20:20:33.819+05:30 [APP/PROC/WEB/0] [OUT] CPU family: 6
2019-02-05T20:20:33.819+05:30 [APP/PROC/WEB/0] [OUT] Model: 58
2019-02-05T20:20:33.819+05:30 [APP/PROC/WEB/0] [OUT] Stepping: 0
2019-02-05T20:20:33.820+05:30 [APP/PROC/WEB/0] [OUT] CPU MHz: 2599.998
2019-02-05T20:20:33.820+05:30 [APP/PROC/WEB/0] [OUT] BogoMIPS: 5199.99
2019-02-05T20:20:33.820+05:30 [APP/PROC/WEB/0] [OUT] Hypervisor vendor: VMware
2019-02-05T20:20:33.820+05:30 [APP/PROC/WEB/0] [OUT] Virtualization type: full
2019-02-05T20:20:33.820+05:30 [APP/PROC/WEB/0] [OUT] L1d cache: 32K
2019-02-05T20:20:33.820+05:30 [APP/PROC/WEB/0] [OUT] L1i cache: 32K
2019-02-05T20:20:33.821+05:30 [APP/PROC/WEB/0] [OUT] L2 cache: 256K
2019-02-05T20:20:33.821+05:30 [APP/PROC/WEB/0] [OUT] L3 cache: 40960K