# MemSQL holding ( \>10 GB )RAM in columnstore

**URL:** <https://www.singlestore.com/forum/t/memsql-holding-10-gb-ram-in-columnstore/1170>\
**Category:** Connectors and Pipelines\
**Created:** [August 23, 2019, 12:31pm UTC](https://www.singlestore.com/forum/t/memsql-holding-10-gb-ram-in-columnstore/1170 "2019-08-23T12:31:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jilani.m](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jilani.m](https://www.singlestore.com/forum/u/jilani.m)\
**Post date:** [August 23, 2019, 12:31pm UTC](https://www.singlestore.com/forum/t/memsql-holding-10-gb-ram-in-columnstore/1170/1 "2019-08-23T12:31:12Z")

</div>

Hey,  
I’m running memSQL in a 48 core server with a RAM of 72 GB,  
After inserting 100CR rows, memSQL holding just 2GB (Checked in the TOP command ),

But, after executing 10s of queries, RAM holds by memSQL process crossing 10GB, and not getting normal.

What is the issue? and How to check what causing the memory holding?

---

<div class="post-metadata">

**Author:** ![adam](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@adam](https://www.singlestore.com/forum/u/adam)\
**Post date:** [August 23, 2019, 5:50pm UTC](https://www.singlestore.com/forum/t/memsql-holding-10-gb-ram-in-columnstore/1170/2 "2019-08-23T17:50:29Z")

</div>

MemSQL will cache up to 25% of maximum\_memory in its memory allocators to avoid need to go to linux for memory. It will show up as “Buffer\_manager\_cached\_memory” memory on any leaves in your cluster (Connect to a leaf node and run SHOW STATUS EXTENDED to check). This is likely what your seeing. This memory can be re-used for storing rows in rowstore tables as well as for query executions (hash tables, sorts, will use up this memory before going to the OS).

---

<div class="post-metadata">

**Author:** ![jilani.m](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jilani.m](https://www.singlestore.com/forum/u/jilani.m)\
**Post date:** [August 24, 2019, 5:12am UTC](https://www.singlestore.com/forum/t/memsql-holding-10-gb-ram-in-columnstore/1170/3 "2019-08-24T05:12:51Z")

</div>

Hey adam, Thanks for the reply  
Below the result of `SHOW STATUS EXTENDED`

> SHOW STATUS EXTENDED  
> → ;  
> ±----------------------------------------------------------±-------------------------------------------------------------------------------------------------------------------------------------------------+  
> | Variable\_name | Value |  
> ±----------------------------------------------------------±-------------------------------------------------------------------------------------------------------------------------------------------------+  
> | Aborted\_clients | 22 |  
> | Aborted\_connects | 0 |  
> | Bytes\_received | 62283504 |  
> | Bytes\_sent | 61637580 |  
> | Connections | 29 |  
> | Max\_used\_connections | 20 |  
> | Queries | 41 |  
> | Questions | 41 |  
> | Threads\_cached | 16 |  
> | Threads\_connected | 4 |  
> | Threads\_created | 20 |  
> | Threads\_running | 2 |  
> | Threads\_background | 2 |  
> | Threads\_shutdown | 0 |  
> | Threads\_idle | 0 |  
> | Ready\_queue | 0 |  
> | Idle\_queue | 0 |  
> | Context\_switches | 29 |  
> | Context\_switch\_misses | 0 |  
> | Workload\_management\_queued\_queries | 0 |  
> | Workload\_management\_active\_queries | 0 |  
> | Workload\_management\_active\_threads | 0 |  
> | Workload\_management\_active\_connections | 0 |  
> | Columnstore\_ingest\_management\_queued\_queries | 0 |  
> | Columnstore\_ingest\_management\_active\_queries | 0 |  
> | Columnstore\_ingest\_management\_estimated\_segments\_to\_flush | 0 |  
> | Columnstore\_ingest\_management\_estimated\_memory | 0.000 MB |  
> | Uptime | 2705 |  
> | Prepared\_stmt\_count | 0 |  
> | Auto\_attach\_remaining\_seconds | 0 |  
> | Data\_directory | /var/lib/memsql/af5e0466-f375-43ba-82f6-4ef0ef83a746/data |  
> | Plancache\_directory | /var/lib/memsql/af5e0466-f375-43ba-82f6-4ef0ef83a746/plancache |  
> | Transaction\_logs\_directory | /var/lib/memsql/af5e0466-f375-43ba-82f6-4ef0ef83a746/data/logs |  
> | Segments\_directory | /var/lib/memsql/af5e0466-f375-43ba-82f6-4ef0ef83a746/data/columns |  
> | Snapshots\_directory | /var/lib/memsql/af5e0466-f375-43ba-82f6-4ef0ef83a746/data/snapshots |  
> | Threads\_waiting\_for\_disk\_space | 0 |  
> | Aggregator\_id | 1 |  
> | License | BDM3YzZhMjllY2Q1NjQ3N2I5YmY5NTVkZWI3MjFkMjFjhiKDXQAAAAAAAAAAAAAAAAkwNAIYF6AmuGbjWp55WsMl/owMGgMbJkwYceXGAhgUmaO/YWTKjUsghA5Y13TM7e8Cto7POCwAAA== |  
> | License\_version | 4 |  
> | License\_capacity | 18446744073709551615 units |  
> | Used\_instance\_license\_units | 0 |  
> | License\_expiration | 1568875142 |  
> | Seconds\_until\_expiration | 2311724 |  
> | License\_key | 37c6a29ecd56477b9bf955deb721d21c |  
> | License\_type | enterprise |  
> | Maximum\_cluster\_capacity | 18446744073709551615 units |  
> | Used\_cluster\_capacity | 8 units |  
> | Query\_compilations | 1 |  
> | Query\_compilation\_failures | 0 |  
> | Inflight\_async\_compilations | 0 |  
> | GCed\_versions\_last\_sweep | 0 |  
> | Average\_garbage\_collection\_duration | 0 ms |  
> | Total\_server\_memory | 568.0 (+568.0) MB |  
> | Total\_io\_pool\_memory | 0.2 (+0.2) MB |  
> | Free\_io\_pool\_memory | 0.1 (+0.1) MB |  
> | Alloc\_thread\_stacks | 22.000 (+22.000) MB |  
> | Malloc\_active\_memory | 370.421 (+370.421) MB |  
> | Malloc\_transaction\_cached\_memory | 323.750 (+323.750) MB |  
> | Buffer\_manager\_memory | 28.6 (+28.6) MB |  
> | **Buffer\_manager\_cached\_memory** | **9.4 (+9.4) MB** |  
> | Buffer\_manager\_unrecycled\_memory | 3.0 (+3.0) MB |  
> | Alloc\_skiplist\_tower | 4.625 (+4.625) MB |  
> | Alloc\_variable | 3.125 (+3.125) MB |  
> | Alloc\_table\_primary | 3.000 (+3.000) MB |  
> | Alloc\_deleted\_version | 2.250 (+2.250) MB |  
> | Alloc\_internal\_key\_node | 2.000 (+2.000) MB |  
> | Alloc\_hash\_buckets | 13.208 (+13.208) MB |  
> | Alloc\_table\_metadata\_cache | 0.125 (+0.125) MB |  
> | Alloc\_unit\_images | 3.065 (+3.065) MB |  
> | Alloc\_unit\_ifn\_thunks | 0.200 (+0.200) MB |  
> | Alloc\_object\_code\_images | 1.244 (+1.244) MB |  
> | Alloc\_compiled\_unit\_sections | 0.750 (+0.750) MB |  
> | Alloc\_databases\_list\_entry | 0.125 (+0.125) MB |  
> | Alloc\_plan\_cache | 0.125 (+0.125) MB |  
> | Alloc\_warnings | 0.125 (+0.125) MB |  
> | Alloc\_durability\_large | 128.188 (+128.188) MB |  
> | Alloc\_skynet\_replication | 0.250 (+0.250) MB |  
> | Alloc\_sharding\_partitions | 0.125 (+0.125) MB |  
> | Alloc\_protocol\_packet | 0.375 (+0.375) MB |  
> | Alloc\_table\_memory | 28.208 (+28.208) MB |  
> | Alloc\_variable\_bucket\_16 | allocs:2457 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_24 | allocs:1869 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_32 | allocs:307 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_40 | allocs:125 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_48 | allocs:95 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_56 | allocs:30 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_64 | allocs:11 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_72 | allocs:32 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_104 | allocs:3 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_128 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_160 | allocs:1 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_312 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_384 | allocs:3 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_480 | allocs:6 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_600 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_752 | allocs:1 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_936 | allocs:5 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_1168 | allocs:1 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_1480 | allocs:3 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_1832 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_2832 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_3528 | allocs:1 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_4504 | allocs:0 alloc\_MB:0.0 buffer\_MB:0.2 cached\_buffer\_MB:0.2 |  
> | Alloc\_variable\_bucket\_5680 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_cached\_buffers | 0.2 (+0.2) MB |  
> | Alloc\_variable\_allocated | 0.1 MB |  
> | Successful\_read\_queries | 31 |  
> | Successful\_write\_queries | 0 |  
> | Failed\_read\_queries | 0 |  
> | Failed\_write\_queries | 0 |  
> | Rows\_returned\_by\_reads | 5104417 |  
> | Rows\_affected\_by\_writes | 0 |  
> | Execution\_time\_of\_reads | 286390 ms |  
> | Execution\_time\_of\_write | 0 ms |  
> | Transaction\_buffer\_wait\_time | 0 ms |  
> | Transaction\_log\_flush\_wait\_time | 0 ms |  
> | Row\_lock\_wait\_time | 0 ms |  
> | Ssl\_accept\_renegotiates | 0 |  
> | Ssl\_accepts | 0 |  
> | Ssl\_callback\_cache\_hits | 0 |  
> | Ssl\_client\_connects | 0 |  
> | Ssl\_connect\_renegotiates | 0 |  
> | Ssl\_ctx\_verify\_depth | 18446744073709551615 |  
> | Ssl\_ctx\_verify\_mode | 0 |  
> | Ssl\_default\_timeout | 0 |  
> | Ssl\_finished\_accepts | 0 |  
> | Ssl\_finished\_connects | 0 |  
> | Ssl\_session\_cache\_hits | 0 |  
> | Ssl\_session\_cache\_misses | 0 |  
> | Ssl\_session\_cache\_overflows | 0 |  
> | Ssl\_session\_cache\_size | 20480 |  
> | Ssl\_session\_cache\_timeouts | 0 |  
> | Ssl\_sessions\_reused | 0 |  
> | Ssl\_used\_session\_cache\_entries | 0 |  
> | Ssl\_verify\_depth | 0 |  
> | Ssl\_verify\_mode | 0 |  
> | Ssl\_cipher | |  
> | Ssl\_cipher\_list | |  
> | Ssl\_version | |  
> | Ssl\_session\_cache\_mode | SERVER |  
> ±----------------------------------------------------------±-------------------------------------------------------------------------------------------------------------------------------------------------+  
> 140 rows in set (0.00 sec)

from the result it show the Buffer\_manager\_cached\_memory just took 9MB.

---

<div class="post-metadata">

**Author:** ![jilani.m](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jilani.m](https://www.singlestore.com/forum/u/jilani.m)\
**Post date:** [August 24, 2019, 5:37am UTC](https://www.singlestore.com/forum/t/memsql-holding-10-gb-ram-in-columnstore/1170/4 "2019-08-24T05:37:07Z")

</div>

The previous one in the MASTER node,

sharing the LEAF node’s result here,

> ±----------------------------------------------------------±-------------------------------------------------------------------------------------------------------------------------------------------------+  
> | Variable\_name | Value |  
> ±----------------------------------------------------------±-------------------------------------------------------------------------------------------------------------------------------------------------+  
> | Aborted\_clients | 9 |  
> | Aborted\_connects | 0 |  
> | Bytes\_received | 182181580 |  
> | Bytes\_sent | 260171088 |  
> | Connections | 811 |  
> | Max\_used\_connections | 1469 |  
> | Queries | 184080 |  
> | Questions | 184080 |  
> | Threads\_cached | 1434 |  
> | Threads\_connected | 803 |  
> | Threads\_created | 1469 |  
> | Threads\_running | 1 |  
> | Threads\_background | 1 |  
> | Threads\_shutdown | 0 |  
> | Threads\_idle | 768 |  
> | Ready\_queue | 0 |  
> | Idle\_queue | 0 |  
> | Context\_switches | 4835 |  
> | Context\_switch\_misses | 54 |  
> | Workload\_management\_queued\_queries | 0 |  
> | Workload\_management\_active\_queries | 0 |  
> | Workload\_management\_active\_threads | 0 |  
> | Workload\_management\_active\_connections | 0 |  
> | Columnstore\_ingest\_management\_queued\_queries | 0 |  
> | Columnstore\_ingest\_management\_active\_queries | 0 |  
> | Columnstore\_ingest\_management\_estimated\_segments\_to\_flush | 0 |  
> | Columnstore\_ingest\_management\_estimated\_memory | 0.000 MB |  
> | Uptime | 59093 |  
> | Prepared\_stmt\_count | 0 |  
> | Auto\_attach\_remaining\_seconds | 0 |  
> | Data\_directory | /var/lib/memsql/0e062b82-8cad-4699-a32c-10a79740304a/data |  
> | Plancache\_directory | /var/lib/memsql/0e062b82-8cad-4699-a32c-10a79740304a/plancache |  
> | Transaction\_logs\_directory | /var/lib/memsql/0e062b82-8cad-4699-a32c-10a79740304a/data/logs |  
> | Segments\_directory | /var/lib/memsql/0e062b82-8cad-4699-a32c-10a79740304a/data/columns |  
> | Snapshots\_directory | /var/lib/memsql/0e062b82-8cad-4699-a32c-10a79740304a/data/snapshots |  
> | Threads\_waiting\_for\_disk\_space | 0 |  
> | License | BDM3YzZhMjllY2Q1NjQ3N2I5YmY5NTVkZWI3MjFkMjFjhiKDXQAAAAAAAAAAAAAAAAkwNAIYF6AmuGbjWp55WsMl/owMGgMbJkwYceXGAhgUmaO/YWTKjUsghA5Y13TM7e8Cto7POCwAAA== |  
> | License\_version | 4 |  
> | License\_capacity | 18446744073709551615 units |  
> | Used\_instance\_license\_units | 8 |  
> | License\_expiration | 1568875142 |  
> | Seconds\_until\_expiration | 2251055 |  
> | License\_key | 37c6a29ecd56477b9bf955deb721d21c |  
> | License\_type | enterprise |  
> | Maximum\_cluster\_capacity | 18446744073709551615 units |  
> | Query\_compilations | 1 |  
> | Query\_compilation\_failures | 0 |  
> | Inflight\_async\_compilations | 0 |  
> | GCed\_versions\_last\_sweep | 0 |  
> | Average\_garbage\_collection\_duration | 1 ms |  
> | Total\_server\_memory | 4917.6 (+4917.6) MB |  
> | Total\_io\_pool\_memory | 0.1 (+0.1) MB |  
> | Free\_io\_pool\_memory | 0.0 MB |  
> | Alloc\_thread\_stacks | 1470.000 (+1470.000) MB |  
> | Malloc\_active\_memory | 1084.189 (+1084.189) MB |  
> | Malloc\_transaction\_cached\_memory | 973.464 (+973.464) MB |  
> | Buffer\_manager\_memory | 1728.8 (+1728.8) MB |  
> | Buffer\_manager\_cached\_memory | 1441.0 (+1441.0) MB |  
> | Buffer\_manager\_unrecycled\_memory | 0.0 MB |  
> | Alloc\_skiplist\_tower | 24.000 (+24.000) MB |  
> | Alloc\_variable | 30.250 (+30.250) MB |  
> | Alloc\_table\_primary | 17.250 (+17.250) MB |  
> | Alloc\_deleted\_version | 11.250 (+11.250) MB |  
> | Alloc\_internal\_key\_node | 7.125 (+7.125) MB |  
> | Alloc\_hash\_buckets | 37.473 (+37.473) MB |  
> | Alloc\_table\_metadata\_cache | 0.750 (+0.750) MB |  
> | Alloc\_unit\_images | 7.290 (+7.290) MB |  
> | Alloc\_unit\_ifn\_thunks | 0.411 (+0.411) MB |  
> | Alloc\_object\_code\_images | 3.017 (+3.017) MB |  
> | Alloc\_compiled\_unit\_sections | 1.762 (+1.762) MB |  
> | Alloc\_databases\_list\_entry | 0.250 (+0.250) MB |  
> | Alloc\_plan\_cache | 0.125 (+0.125) MB |  
> | Alloc\_warnings | 96.000 (+96.000) MB |  
> | Alloc\_replication\_large | 8.000 (+8.000) MB |  
> | Alloc\_durability\_large | 576.626 (+576.626) MB |  
> | Alloc\_skynet\_replication | 0.375 (+0.375) MB |  
> | Alloc\_sharding\_partitions | 0.125 (+0.125) MB |  
> | Alloc\_log\_replay | 0.008 (+0.008) MB |  
> | Alloc\_mmap\_file | 3072.000 (+3072.000) MB |  
> | Alloc\_protocol\_packet | 100.250 (+100.250) MB |  
> | Alloc\_table\_memory | 127.348 (+127.348) MB |  
> | Alloc\_variable\_bucket\_16 | allocs:10930 alloc\_MB:0.2 buffer\_MB:5.2 cached\_buffer\_MB:1.9 |  
> | Alloc\_variable\_bucket\_24 | allocs:2164 alloc\_MB:0.0 buffer\_MB:1.2 cached\_buffer\_MB:0.8 |  
> | Alloc\_variable\_bucket\_32 | allocs:2418 alloc\_MB:0.1 buffer\_MB:4.2 cached\_buffer\_MB:1.9 |  
> | Alloc\_variable\_bucket\_40 | allocs:225 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_48 | allocs:2507 alloc\_MB:0.1 buffer\_MB:1.2 cached\_buffer\_MB:0.4 |  
> | Alloc\_variable\_bucket\_56 | allocs:345 alloc\_MB:0.0 buffer\_MB:0.4 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_64 | allocs:238 alloc\_MB:0.0 buffer\_MB:0.2 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_72 | allocs:56 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_88 | allocs:19 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_104 | allocs:7 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_128 | allocs:23 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_160 | allocs:5 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_312 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_384 | allocs:3 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_480 | allocs:5 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_600 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_752 | allocs:1 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_936 | allocs:5 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_1168 | allocs:1 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_1480 | allocs:3 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_1832 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_2832 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_3528 | allocs:1 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_4504 | allocs:0 alloc\_MB:0.0 buffer\_MB:1.6 cached\_buffer\_MB:1.6 |  
> | Alloc\_variable\_bucket\_5680 | allocs:2 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.0 |  
> | Alloc\_variable\_bucket\_7264 | allocs:0 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.1 |  
> | Alloc\_variable\_bucket\_9344 | allocs:0 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.1 |  
> | Alloc\_variable\_bucket\_11896 | allocs:0 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.1 |  
> | Alloc\_variable\_bucket\_14544 | allocs:0 alloc\_MB:0.0 buffer\_MB:0.1 cached\_buffer\_MB:0.1 |  
> | Alloc\_variable\_bucket\_18696 | allocs:0 alloc\_MB:0.0 buffer\_MB:1.2 cached\_buffer\_MB:1.2 |  
> | Alloc\_variable\_bucket\_21816 | allocs:0 alloc\_MB:0.0 buffer\_MB:0.2 cached\_buffer\_MB:0.2 |  
> | Alloc\_variable\_bucket\_26184 | allocs:0 alloc\_MB:0.0 buffer\_MB:2.1 cached\_buffer\_MB:2.1 |  
> | Alloc\_variable\_bucket\_32728 | allocs:0 alloc\_MB:0.0 buffer\_MB:2.4 cached\_buffer\_MB:2.4 |  
> | Alloc\_variable\_bucket\_43648 | allocs:0 alloc\_MB:0.0 buffer\_MB:3.1 cached\_buffer\_MB:3.1 |  
> | Alloc\_variable\_bucket\_65472 | allocs:0 alloc\_MB:0.0 buffer\_MB:2.1 cached\_buffer\_MB:2.1 |  
> | Alloc\_variable\_bucket\_130960 | allocs:0 alloc\_MB:0.0 buffer\_MB:2.0 cached\_buffer\_MB:2.0 |  
> | Alloc\_variable\_cached\_buffers | 20.2 (+20.2) MB |  
> | Alloc\_variable\_allocated | 0.5 MB |  
> | Successful\_read\_queries | 120710 |  
> | Successful\_write\_queries | 2301 |  
> | Failed\_read\_queries | 0 |  
> | Failed\_write\_queries | 0 |  
> | Rows\_returned\_by\_reads | 756608 |  
> | Rows\_affected\_by\_writes | 0 |  
> | Execution\_time\_of\_reads | 1057347 ms |  
> | Execution\_time\_of\_write | 14995578 ms |  
> | Transaction\_buffer\_wait\_time | 0 ms |  
> | Transaction\_log\_flush\_wait\_time | 0 ms |  
> | Row\_lock\_wait\_time | 0 ms |  
> | Ssl\_accept\_renegotiates | 0 |  
> | Ssl\_accepts | 0 |  
> | Ssl\_callback\_cache\_hits | 0 |  
> | Ssl\_client\_connects | 0 |  
> | Ssl\_connect\_renegotiates | 0 |  
> | Ssl\_ctx\_verify\_depth | 18446744073709551615 |  
> | Ssl\_ctx\_verify\_mode | 0 |  
> | Ssl\_default\_timeout | 0 |  
> | Ssl\_finished\_accepts | 0 |  
> | Ssl\_finished\_connects | 0 |  
> | Ssl\_session\_cache\_hits | 0 |  
> | Ssl\_session\_cache\_misses | 0 |  
> | Ssl\_session\_cache\_overflows | 0 |  
> | Ssl\_session\_cache\_size | 20480 |  
> |  
> 153 rows in set (0.00 sec)

If you can explain why its taking memory for different things,  
I read the documentation and didn’t understand it well.

---

<div class="post-metadata">

**Author:** ![adam](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@adam](https://www.singlestore.com/forum/u/adam)\
**Post date:** [August 26, 2019, 2:55am UTC](https://www.singlestore.com/forum/t/memsql-holding-10-gb-ram-in-columnstore/1170/5 "2019-08-26T02:55:14Z")

</div>

There is some information to help you interpret these results here:

> **[SingleStoreDB Cloud · SingleStore Documentation](https://docs.singlestore.com/operational-manual/v6.8/identifying-reducing-memory-usage/)**
>
> SingleStore is a modern relational database for cloud and on-premises that delivers immediate insights for modern applications and analytical systems. Book a demo or trial today!

Your leaf is using 5 GB of Memory:  
`| Total_server_memory | 4917.6 (+4917.6) MB |`

Most of it is here:

- ` | Buffer_manager_cached_memory | 1441.0 (+1441.0) MB |`  
This is memory I referred to above

- ` | Alloc_thread_stacks | 1470.000 (+1470.000) MB |`

- ` | Malloc_transaction_cached_memory | 973.464 (+973.464) MB |`  
This is memory for the thread pool on the leaf. If will grow and shrink overtime depending on how many concurrent queries the leaf typically runs at once.

Where are you getting the 10 GB number from?

---

<div class="post-metadata">

**Author:** ![jilani.m](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jilani.m](https://www.singlestore.com/forum/u/jilani.m)\
**Post date:** [August 26, 2019, 5:01am UTC](https://www.singlestore.com/forum/t/memsql-holding-10-gb-ram-in-columnstore/1170/6 "2019-08-26T05:01:27Z")

</div>

When we run the **TOP** command on the server, there are two instance of memSQL of which one is utilizing **10 GB** of RAM and another 1 GB.
