When should we use Spring boot actuator. If included, how much impact does it have on application memory and cpu usage?
I am currently using Spring Boot 2.x.
With Actuator, you can get production-grade tools without having to actually implement these features yourself. You can expose detailed information about the running application, for example, its health, detailed metrics, JVM dump, environment variables, etc.
If you are using any health check, the actuator health endpoint is a very good candidate. This is useful if you are running your applications on platforms such as PCF.
You can even add your own custom actuator endpoints according to your needs.
In the most recent versions of Spring Boot (I don't exactly recall when this changed), only the health endpoint is enabled by default for HTTP access.
Having said all that and since I've never read anything about Spring Boot Actuator having a huge application memory and CPU impact I would say that it is negligible.
Reference documentation: https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html.