3 ms·
I had a couple of ideas: given a machine (or a VM) with an amount of RAM which is enough to handle all the db in memory (eg: 8GB for a 512MB dataset), maybe it'
by thibaut_barrere 16y ago
I had a couple of ideas: given a machine (or a VM) with an amount of RAM which is enough to handle all the db in memory (eg: 8GB for a 512MB dataset), maybe it's possible to track the OS overall used RAM and have a rough idea ?
One other way would be to have a more intimate knowledge of how the stores work and make a computation: for instance when some column stores, you can compute the bytes taken by column if you know how the inner engine works.
- otterley 16y agoYou can use the VSZ of the process (from ps(1)) as a rough approximation of memory utilization. This is what the process maximally could address (without mapping or allocating any additional memory) at the moment of measurement, and may include pages that are in fact not in memory at the time (because they might be references to pages that are on files or swap). RSS tells you what is currently "resident" (i.e. in RAM) but doesn't include pages that are in files or swap. Personally, I'm much more interested in flows (paging and I/O activity) than stocks (how many pages a process has allocated). If I'm comparing two competing platforms with the same durability guarantees on identical hardware using identical data access patterns, the one with the lower paging/swapping activity wins. It's not always the one with the smaller memory utilization!