简体   繁体   English

如何减少Play2应用程序的处理量?

[英]How to reduce amount of processes for a Play2 application?

I deployed some internal Play2 applications to a server. 我将一些内部Play2应用程序部署到服务器上。

Since it's a development server, it does not have much resources. 由于它是开发服务器,因此没有太多资源。 In top of that, it has to share them with other applications running on it. 最重要的是,它必须与在其上运行的其他应用程序共享它们。

Play2应用程序的资源使用情况

Using htop I see that the app. 使用htop我看到该应用程序。 running on port 9002 was forked something like 20 times. 在端口9002上运行的内容被分叉了大约20次。 Same thing for the app. 该应用程序也是如此。 running on port 9001 . 9001端口上运行。

So, my first questions are: 因此,我的第一个问题是:

  • how bad is this? 这有多糟? (for the resources of this machine) (用于本机的资源)
  • how can I reduce the amount of processes per application? 如何减少每个应用程序的进程数量

Additionally, it would be great if you could comment on what a recommended server configuration would look like (memory/CPU). 此外,如果您可以对建议的服务器配置 (内存/ CPU)进行评论,那就太好了。 It's an intranet application and it does not have many concurrent users (one or two, five tops). 它是一个Intranet应用程序,没有很多并发用户(一两个,五个顶部)。 Most of the time it will just sit idle. 在大多数情况下,它只会闲置。

Thanks! 谢谢!

Those are not processes, but threads. 这些不是进程,而是线程。 If you hit F5 , you will see that they are all children of the main process and if you go to Setup -> Display Option and select Display threads in a different color , you will also see it by the color. 如果按F5 ,您将看到它们都是主要过程的子级;如果转到“ Setup -> Display Option并选择“ Display threads in a different color ,则也会按颜色看到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM