-
mmap increasing every time table is queried
Hi all,
We have a table with a mix of atom and string columns. Every time we query certain date partitions with a simple select:
select from table where date = x
we see the process mmap usage increase. The only way we know to reduce this is by restarting the process.
We tested querying with subsets of return columns, and found that if we exclude 4 string columns (string1, string2, string3, string4) from our result, the mmap doesn’t increase.
The value that mmap increases by varies with the columns returned, for example:
- If we only return (string1, string2, string3, string4) columns, the mmap doesn’t increase
- If we return all columns, mmap increases by 2461536 bytes
- If we exclude any 3 out of the 4 string columns, the mmap increases by 2461536 bytes also
- If we return 1 – 4 of the string columns along with the virtual column “date”, the mmap doesn’t increase
- If we return 1 – 4 of the string columns along with an increasing number of other columns, the mmap value increases in steps (shown in snippet below)
Would anyone be able to shed any light on this behaviour?
FYI we looked at the column values for the 4 string columns, and confirmed all values within are of type 10h.
We are using kdb+ 3.5 2017.10.11
We don’t assign the result of the query to a variable
Thanks,
Eoghan
// .Q.w[] output after returning increasing numbers of columns, where one column is one of the 4 aforementioned string columns // delta_mmap added to show difference between mmap values // Note we run .Q.w[] before and after the select statement, the difference between the two runs is what is shown below numCols used heap peak wmax mmap mphy syms symw delta_mmap ------------------------------------------------------------- 2 160 0 0 0 87912 0 0 0 87912 3 160 0 0 0 175824 0 0 0 87912 4 160 0 0 0 219780 0 0 0 43956 5 160 0 0 0 263736 0 0 0 43956 6 160 0 0 0 307692 0 0 0 43956 7 160 0 0 0 351648 0 0 0 43956 8 160 0 0 0 395604 0 0 0 43956 9 160 0 0 0 483516 0 0 0 87912 10 160 0 0 0 527472 0 0 0 43956 11 160 0 0 0 571428 0 0 0 43956 12 160 0 0 0 615384 0 0 0 43956 13 160 0 0 0 659340 0 0 0 43956 14 160 0 0 0 747252 0 0 0 87912 15 160 0 0 0 835164 0 0 0 87912 16 160 0 0 0 879120 0 0 0 43956 17 160 0 0 0 923076 0 0 0 43956 18 160 0 0 0 967032 0 0 0 43956 19 160 0 0 0 1010988 0 0 0 43956 20 160 0 0 0 1054944 0 0 0 43956 21 160 0 0 0 1142856 0 0 0 87912 22 160 0 0 0 1186812 0 0 0 43956 23 160 0 0 0 1230768 0 0 0 43956 24 160 0 0 0 1318680 0 0 0 87912 25 160 0 0 0 1362636 0 0 0 43956 26 160 0 0 0 1450548 0 0 0 87912 27 160 0 0 0 1494504 0 0 0 43956 28 160 0 0 0 1582416 0 0 0 87912 29 160 0 0 0 1626372 0 0 0 43956 30 160 0 0 0 1714284 0 0 0 87912 31 160 0 0 0 1758240 0 0 0 43956 32 160 0 0 0 1802196 0 0 0 43956 33 160 0 0 0 1846152 0 0 0 43956 34 160 0 0 0 1890108 0 0 0 43956 35 160 0 0 0 1934064 0 0 0 43956 36 160 0 0 0 1978020 0 0 0 43956 37 160 0 0 0 2065932 0 0 0 87912 38 160 0 0 0 2153844 0 0 0 87912 39 160 0 0 0 2241756 0 0 0 87912 40 160 0 0 0 2285712 0 0 0 43956 41 160 0 0 0 2329668 0 0 0 43956 42 160 0 0 0 2373624 0 0 0 43956 43 160 0 0 0 2417580 0 0 0 43956 44 160 0 0 0 2461536 0 0 0 43956
Log in to reply.