调试Akka性能 [英] Debugging akka performance

查看:121
本文介绍了调试Akka性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个Akka应用程序,其中每个参与者都调用一个Web服务。进行性能测试时,演员在大约6分钟后开始反应非常缓慢。我创建了一个单元测试来测试性能,但没有发现任何问题。我意识到这是一个普遍的问题,但是我可以调查应用程序的一般区域以发现问题可能出在哪里吗?

I've working on an Akka application where each actor invokes a web service. When a performance test is run the actors start to respond very slowly after approx 6 minutes. I've created a unit test to test the performance and not seeing any issues. I realize this is a generic question but are there general areas of the application I can investigate to discover where the issue may lie ?

我正在考虑的一个区域是路由: http://doc.akka.io/docs/akka/snapshot/scala/routing.html

One area I'm considering is routing : http://doc.akka.io/docs/akka/snapshot/scala/routing.html

推荐答案

首先使用标准工具 jvisualvm jconsole

如果所有基本参数(CPU,内存,线程状态)均正确,则应尝试使用 kamon监视特定的参与者。 io 和garfana / statsd / graphite堆栈 docker-config

If all the basics parameters (cpu, memory, threads state) are correct, then you should try monitoring particular actors using kamon.io and garfana/statsd/graphite stack docker-config

您可以遵循入门手册并在中应用以下配置您的 application.conf

You can follow get-started manual and apply following configuration in your application.conf

kamon
{
  metrics
  {
    actor {
      filters = [
        {
          actor {
            includes = ["*"]
            excludes = ["system/*", "user/IO-*"]
          }
        },
        {
          router {
            includes = ["*"]
            excludes = ["system/*", "user/IO-*"]
          }
        },
        {
          trace {
            includes = ["*"]
            excludes = []
          }
        },
        {
          dispatcher {
            includes = ["default-dispatcher"]
            excludes = []
          }
        }
      ]
    }
  }
  statsd {
    hostname = "10.0.1.4"
    port = 8125
    flush-interval = 1 second
    max-packet-size = 1024 bytes

    includes
    {
      actor = ["*"]
      trace = ["*"]
      dispatcher = ["*"]
    }
    simple-metric-key-generator {

      application = "test.akka"
    }
  }
}

这篇关于调试Akka性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆