问题
  • 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.