# How to interpret memory stats in filebeat log

**URL:** <https://discuss.elastic.co/t/how-to-interpret-memory-stats-in-filebeat-log/191110>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 17, 2019, 11:55pm UTC](https://discuss.elastic.co/t/how-to-interpret-memory-stats-in-filebeat-log/191110 "2019-07-17T23:55:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [July 25, 2019, 6:52pm UTC](https://discuss.elastic.co/t/how-to-interpret-memory-stats-in-filebeat-log/191110/2 "2019-07-25T18:52:43Z")

</div>

Hello @filebeater,

Good question to ask, I took the following directly from the go documentation.

**beat.memstats.gc\_next=32389200**

```auto
	// NextGC is the target heap size of the next GC cycle.
	//
	// The garbage collector's goal is to keep HeapAlloc ≤ NextGC.
	// At the end of each GC cycle, the target for the next cycle
	// is computed based on the amount of reachable data and the
	// value of GOGC.

```

**beat.memstats.memory\_alloc=32504416**

```auto
	// HeapAlloc is bytes of allocated heap objects.
	//
	// "Allocated" heap objects include all reachable objects, as
	// well as unreachable objects that the garbage collector has
	// not yet freed. Specifically, HeapAlloc increases as heap
	// objects are allocated and decreases as the heap is swept
	// and unreachable objects are freed. Sweeping occurs
	// incrementally between GC cycles, so these two processes
	// occur simultaneously, and as a result HeapAlloc tends to
	// change smoothly (in contrast with the sawtooth that is
	// typical of stop-the-world garbage collectors).

```

**beat.memstats.memory\_total=51506747192**

```auto
   // TotalAlloc is cumulative bytes allocated for heap objects.
   //
   // TotalAlloc increases as heap objects are allocated, but
   // unlike Alloc and HeapAlloc, it does not decrease when
   // objects are freed.

```

So when you are talking about 51G, i think you are referring to the `memory_total`, which is a bit misleading, because no you wont use that much memory it only trace how much memory has been allocaled in total.

So the value you should look at is `memory_alloc`, 32504416 bytes so 30M.

---

_[View the full topic](https://discuss.elastic.co/t/how-to-interpret-memory-stats-in-filebeat-log/191110)._
