Our services serve 300 rpm. I see that APM uses LMAX ring buffer, so what is the recommended sampling percentage. Or if I have 100% sampling what is the overhead I will be getting.
Right now our services have max 1 GB memory. Is there any recommended memory when using with APM? Do I need to increase memory?
That totally comes down to your preferences and your application. The more you want to sample, the more network bandwidth and disk space you'll need.
The latency of your application won't be affected much by the agent (in the order of single-digit microseconds), even if you sample 100%. But the background reporter thread has some work to do for serializing and gzipping the events. If you application is not CPU bound, that should not matter much, however.
Note that if the APM Server can't handle all the events, the agent will drop data to not crash your application. It will then also not serialize and gzip the events.
The Java agent is designed to be very light on memory and you should not have to increase your heap size. It has a static overhead of a couple of MB which are allocated in the beginning and after that it does barely allocate anything after that.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.