Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Use Unity Accelerator locally only

Discussion in 'General Discussion' started by UDN_388648da-a4c8-4308-af17-47614073dd10, Jul 4, 2023.

  1. UDN_388648da-a4c8-4308-af17-47614073dd10

    UDN_388648da-a4c8-4308-af17-47614073dd10

    Joined:
    May 13, 2017
    Posts:
    40
    How do I use Unity Accelerator locally only?

    I referred to this article, but cannot determine if a cache is being used.
    https://korinvr.com/blog/2020/02/09/

    My expectation was that the folder where the project cache is stored, i.e. Library, would no longer be used,
    I deleted Library and re-launched the project, but it did not have much effect as Library went from 3GB to 2.8GB.

    The folder I specified as the destination for the Accelerator cache is creating something 1.8GB. I do not know what it is.
    The DB icon in the lower right corner of the editor is blue and shows "cache server connected" when selected.
    However, as noted earlier, the size of the library has hardly decreased, so I don't believe it is working.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    This is not the case. The cache synchronizes the Library with other machines so that other users can simply download the Library files rather than regenerating them locally. It is not a means to reduce the Library folder's size on local machines.

    You gain no benefit from using the Accelerator only on your local machine. The Accelerator is for on-site teamwork, so that for example the early bird developer isn't suffering through an hour-long Library load because the late-nighter artist checked in gigabytes of new or modified assets. These asset's Library files already exist and only need to be transferred to the early-bird's local machine (which still takes time, and depending on the hardware/network involved it can even be slower than locally generating the Library).
     
    Ryiah likes this.
  3. UDN_388648da-a4c8-4308-af17-47614073dd10

    UDN_388648da-a4c8-4308-af17-47614073dd10

    Joined:
    May 13, 2017
    Posts:
    40
    Thanks for the answer.
    Why is it possible to speed up the process by having multiple people on a team share a cache, but not by having multiple projects share a local cache?
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    It works like this:
    • artists creates and submits to source control new art assets
    • since artist already has Unity project open with Accelerator connected, the Library files for these new assets are already in the Accelerator database
    • teammate pulls new version with new assets and opens Unity
      • Unity looks for Library files for new assets in the Accelerator database and downloads them if they exist (ideally through a superfast Gigabit network from an on-site cache server with RAID SSDs for super-fast disk access)
      • otherwise: Unity generates new Library files for new assets locally (likely to be slower, especially if user is on older hardware or loads the project off a spinning magnetic disk)
    You can have the cache locally but you will hardly be working with two instances of the editor and project open at the same time switching between them, so there is no benefit in keeping a local cache of Library files. Especially if these library files are on the same disk as the project itself, in that case it would require duplicating content on the same drive which is always relatively slow due to reading from AND writing to the same physical drive simultaneously.
     
    Ryiah likes this.
  5. UDN_388648da-a4c8-4308-af17-47614073dd10

    UDN_388648da-a4c8-4308-af17-47614073dd10

    Joined:
    May 13, 2017
    Posts:
    40
    In other words, is an accelerator worthless for use on a single PC?
     
  6. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,900
    It was never designed or marketed for that.
     
  7. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    You could say that. In fact it is likely to be slower.

    Imagine a single project without Accelerator: Unity creates and updates the Library folder as you work with it.

    With Accelerator installed locally: As Unity creates and updates the Library folder, it polls the Accelerator for already existing Library files for each asset. If one exists, it copies that into the project. If it does not exist, it creates the Library files like in a single project, except it will also copy the new Library files back to the Accelerator. Disk space usage is 2x Library size + x and due to the extra work, it cannot be faster!

    If the Unity Project and the Accelerator cache location are separated on two different physical SSD drives I would say the performance is probably very close to without using the Accelerator.

    If the Project and Accelerator share the same physical disk then it will definitely be slower due to parallel read/write access on the same drive. If it's even a spinning magnetic hard drive or anything but a fast SSD drive then the adverse performance impact can be significant.