16

There is a numerous articles regarding benefits of JVM NUMA-aware allocators. However I could not find information about what performance impact may cause -XX:+UseNUMA flag for single-node topologies like

# numactl --hardware
available: 1 nodes (0)
node 0 cpus: 0 1 2 3
node 0 size: 32060 MB
node 0 free: 7770 MB
node distances:
node   0 
  0:  10

It seems that this is a kind of corner case and there is no real profit in enabling flag. If so is there any drawbacks may be caused by enabling it?

vsminkov
  • 10,912
  • 2
  • 38
  • 50
  • So the question is, does it hurt to `+UseNUMA` on hardware which happens to be UMA? I think there will be very few people who can authoritatively answer that. – Marko Topolnik Sep 13 '16 at 12:04
  • @MarkoTopolnik yep. I realize that this question will not gain quick response :/ I tried to make a couple of benchmarks to see if there is a difference but still no luck with answer. – vsminkov Sep 13 '16 at 12:09
  • Any potential answer is of course highly sensitive to each specific architecture and JVM version/variant. – Marko Topolnik Sep 13 '16 at 12:10
  • @MarkoTopolnik Theoretical answer will be ok :) It seems to me that jvm could do nothing with just one node but on the other side it will be interesting how does allocator deals with it. – vsminkov Sep 13 '16 at 12:13
  • Theoretically, within the node you could have non-uniform distances between cores. This is probably already true with today's core counts. Subsets of cores share an L2 cache, for example. – Marko Topolnik Sep 13 '16 at 12:15

1 Answers1

14

-XX:+UseNUMA does no harm in these cases.
HotSpot JVM automatically turns off the flag when run on a single node (the source).

apangin
  • 92,924
  • 10
  • 193
  • 247