Privacy Terms

Who We Are At Walk In The Cloud, we are committed to maintaining the trust and confidence of all visitors to our web site. In particular, we want you to know that Walk In The Cloud is not in the business of selling, renting or trading email lists with other companies and businesses for marketing purposes.  In this Privacy Policy, we’ve provided detailed information on when and why we collect personal information, how we use it, the limited conditions under which we may disclose it to others, and how we keep it secure.  We take your privacy seriously and take measures to provide all visitors and users of Walk In The Cloud with a safe and secure environment. Cookies  Walk In The Cloud may set and access Walk In The Cloud cookies on your computer.  Cookies are used to provide our system with the basic information to provide the services you are requesting.  Cookies can be cleared at any time from your internet browser settings.  Google Analytics When someone v...

PM2 多核心Cluster實作方式分享

測試的時候發現,機器即使雙核心,CPU使用率仍然卡在50%上不去,後來才發現原來是PM2只用了一顆核心在跑。

如果要PM2可以跑多核心的執行Thead有一個Cluster模式,但必須要在start的時候下 -i [core number]。如果不確定可以跑多少,可以直接下 -i max,PM2會自動取目前機器最多能執行的Thread數。

舉例來說:
pm2 start -i max index.js --no-automation --name [app name]

pm2 status
可得到下圖兩個Cluster:



留言