How to reduce beat memory usage?

Hi,

I have 3 beats on instances:

  • metricbeat
  • countbeat (the one from developer guide)
  • filebeat

I checked memory usage and the result was surprising:

  590.27 Mb /usr/share/metricbeat/bin/metricbeat
  115.02 Mb /usr/local/bin/countbeat
    7.58 Mb /usr/share/filebeat/bin/filebeat 

How to explain such memory usage diffrence between beats? How to reduce memory usage in own developed beat?

How are you measuring this memory use?