問題
  • CacheServer(緩存服務器)的性能很差,甚至會假死。
原因
 
當CacheServer(緩存服務器)中存有大型項目,並且有多台電腦同時連接使用時,服務器的控制台可能會被大量的Debug信息淹沒,這些信息會拖慢緩存服務器的運行速度(甚至還會崩潰)。
 
解決方案
 
修改CacheServer.js和LegacyCacheServer.js文件,將LOG_LEVEL的值設為2。設為2的意義是只顯示錯誤和警告,不顯示Debug信息。
 
更多信息
 
 
 
------------------------------------------------------------------------------------------------------------------------
 

Installing the Cache Server as a service

The provided .sh and .cmd scripts must be set up as a service on the server. The Cache Server can be safely killed and restarted at any time, since it uses atomic file operations.

New and legacy Cache Servers

Two Cache Server processes are started by default. The legacy Cache Server works with versions of Unity prior to version 5.0. The new Cache Server works with versions of Unity from 5.0 and up. See Cache Server configuration, below for details on configuring, enabling, and disabling the two different Cache Servers.

Cache Server configuration

If you simply start by executing the script, it launches the legacy Cache Server on port 8125 and the new Cache Server on port 8126. It also creates “cache” and “cache5.0” directories in the same directory as the script, and keep data in there. The cache directories are allowed to grow to up to 50 GB by default. You can configure the size and the location of the data using command line options, like this:

./RunOSX.command --path ~/mycachePath --size 2000000000

or

./RunOSX.command --path ~/mycachePath --port 8199 --nolegacy

You can configure the Cache Server by using the following command line options:

  • Use --port to specify the server port. This only applies to the new Cache Server. The default value is 8126.
  • Use --path to specify the path of the cache location. This only applies to the new Cache Server. The default value is ./cache5.0.
  • Use --legacypath to specify the path of the cache location. This only applies to the legacy Cache Server. The default value is ./cache.
  • Use --size to specify the maximum cache size in bytes for both Cache Servers. Files that have not been used recently are automatically discarded when the cache size is exceeded.
  • Use --nolegacy to stop the legacy Cache Server starting. Otherwise, the legacy Cache Server is started on port 8125.