This document summarizes steps taken to optimize CPU usage of a JVM running an Akka application using Spray. The application was not utilizing the CPU effectively, with throughput very low. Understanding Akka's asynchronous, actor-based architecture and obtaining thread dumps revealed the logging was blocking threads. The solution was to configure logging to occur asynchronously within actors to a
![Jvm operation casual talks](https://cdn-ak-scissors.b.st-hatena.com/image/square/1c7c3d93a9c21e7479f7e75e1fe82a99641447e1/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fjvmoperationcasualtalks-140407070640-phpapp01-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)