What's the relationship between Vertica and NUMA?
Does Vertica support NUMA architecture? Is there a best practice for configuring a server with regard to its NUMA? Does the NUMA configuration have any impact on best practice configuration of any aspects of a Vertica database?
Any advice on these topics, and/or links to detailed information on Vertica running on SMP vs NUMA hardware appreciated.
Any advice on these topics, and/or links to detailed information on Vertica running on SMP vs NUMA hardware appreciated.
0
Comments
http://blog.jcole.us/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/
http://frosty-postgres.blogspot.ca/2012/08/postgresql-numa-and-zone-reclaim-mode.html
eg: As you can see above, the free memory on node 0 reduces to 747MB as the query progresses. The allocation to N0 is also significantly imbalanced. What I noticed shortly after was that the memory usage dropped to 5%, which seems to then be consistent for the remainder of the query. Is Vertica switching to not using memory? This would fit with a significant increase (> linear) in execution time when the size of the (theoretic) intermediate relation being worked with by Vertica grows past a certain size.
Am I reading this wrong? Is NUMA a non-issue here?
- Advice on NUMA configuration would be very appreciated.
- Advice on not having this issue would be very appreciated.
- Are these issues resolved in later versions of Vertica (I am running 6.1.2)
The queries I am running should all fit in main memory of one node, let alone 4, and are in the 'trivially parallelisable' category.Running; Vertica 6.1.2
Running on: CentOS release 6.3 (Final)
Linux version 2.6.32-279.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 12:19:21 UTC 2012
HP ProLiant DL380p Gen8, BIOS P70 03/01/2013
1) Add 'vm.zone_reclaim_mode = 0' to /etc/sysctl.conf, save it and execute sysctl -p to load the new settings into the kernel.
We applied this change and saw some improvements.
2) Start Vertica with numactl --interleave=all
Unfortunately, adding this is out of our control. There is a feature request already opened with HP/Vertica to "optimize" for NUMA, but so far no word on any progress there.
There are also other suggestions/optimizations outlined here:
http://blog.jcole.us/2012/04/16/a-brief-update-on-numa-and-mysql/
Am *really* hoping that someone from HP Vertica who knows about this stuff will chime in with their view on best practices however.
$ cat /proc/sys/vm/zone_reclaim_mode
0
I can't really give official advice here as NUMA isn't my personal expertise. But this is an issue that we are aware of. I think our typical recommendation is to switch off NUMA in the BIOS.
Emanuel, do you have an open support case? Support should be able to walk you through starting Vertica with "numactl --interleave=all" if you're running on machines whose BIOS doesn't provide this functionality.
From our perspective, there are two separate things in play here. "Optimize for NUMA" means "make Vertica take advantage of NUMA to run faster than would be possible on traditional SMP systems." The advantages here tend to be quite small on many types of current modern systems, though they are nonzero and will presumably grow as we see servers with more cores and more-complex memory architectures. Separately, as you've seen, Linux itself tries to optimize for NUMA, and sometimes its attempts backfire and cause programs to run much more slowly than they would have with a simple flat memory model on the same physical hardware. That sort of performance regression is something that we can help with right now, typically with steps like those already discussed on this thread.
The issues here are fundamentally in the Linux kernel, not the hardware. For most Vertica users, this doesn't really matter; we'll provide support and assistance either way and wouldn't expect more than that. But if you happen to be a large software shop with systems programmers who are comfortable working with the Linux kernel (and this does describe a number of Vertica users), this is also something that you could address by poking at the kernel's NUMA code. Sounds like many people would appreciate that patch :-)
Adam