2

I have 'test_api' running and top shows that it consumes 35.7% of a total 32 GB memory. But in the overall view, top also shows '3586540 used', which is about 11% of total memory. So:

  1. Does 35.7% include the 'buff/cached' which 'test_api' used?

  2. If not, does this mean 'test_api' has memory leaks?

1 Answer 1

2

11 GB reserved plus 10GB shared memory is used for the process.

32 GB ram plus 64 gb Swap. is total available memory

TOP Shows the sum of all buffered+cached memory, not only for your single process.

A memory leak will consume more memory over time than should be allocated.

Only the programmer will know what is normal behaviour. Or you debug the programme for unaccounted memory that is not reallocated.

TOP is not enough for that task.

sar might be better to watch behaviour over time.

3
  • The memory percentage of 'test_api' keeps growing, dose this indicate memory leaks? Sep 4, 2017 at 0:12
  • 1
    @MickeyShine Maybe. If it keeps growing when it isn't supposed to, that indicates a memory leak. We have no way to know whether it's supposed to. Sep 4, 2017 at 21:00
  • @MickeyShine As Nils said: Only the programmer will know what is normal behaviour.
    – Kusalananda
    Sep 4, 2017 at 21:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .