Asset Server Problems

Hi, first of all thanks for a great community and game engine!

I should start by saying that im a senior windows user and an absolute noob to the Mac and Unix world. Which can explain some errors ive made below…

We are currently in test phase of larger unity-project and we therefor need a viable assetmanagement-revision control solution. Currently we are using svn (hurray for tortoise) to handle most->all of our revision needs.
And i would say that its been stable and dependant.
Before that we used sourcesafe to some extent…

Asset server stress test

We are currently testing out the UnityAssetServer to see if it will be able to handle our needs.
One test was set up using the standard assets shipped with unity pro duplicating them and commiting consecutively to increase filesize and strain on the AssetServer.
Im using the expression “wait time” or time to execute and with that i mean time that unity is
doing something and not telling the user what it does, not including the wait time with presented info about what going on.

We set up a test using the standard assets comming with a pro license, commiting files to the server in the following order:

Initial commits:
Commit 1:
Asset folder size: 45mb
Lib folder (meta,cache) size: 90mb
Commit 2:
Asset folder size: 90mb
Lib folder (meta,cache) size: 186mb
Commit 3:
Asset folder size: 180mb
Lib folder (meta,cache) size: 374mb
Commit 4:
Asset folder size: 183mb
Lib folder (meta,cache) size: 377mb
3sec “wait time” without any indication whats happening.
Commit 5:
Asset folder size: 366mb, ~5600items
Lib folder (meta,cache) size: 757mb, ~1100items
20sec “wait time” without any indication whats happening.
Step 6:
Asset folder size: 366mb ~11200items
Lib folder (meta,cache) size: 757mb ~20000items
endless? (overnight) “wait time” 10h+, required hardware reboot

After the reboot the following errors occured:

Asset Server Error
Failed to connect: could not connect to server: Connection refused
Is the server running on host “tobiass-mac-pro.local.” and accepting
TCP/IP connections on port 10733?

Trying to fix the problem doing a reinstall of the AssetServer, gave the following problems:

  1. The installation Failed halfway pointing out that the asset server was already installed.
  2. Now the user “unitysrv” only has write access to the UnityAssetServer/data folder.
  3. After giving “unitysrv” read acces to the files and now restarting the server using the data folder, it still wasn’t accessible from within Unity giving the follwoing error:

Asset Server Error
Failed to connect: no pg_hba.conf entry for host “fe80::21f:5bff:fe30:b460%en0”, user
“Tobias”, database “overloadtest”, SSL off

  1. After looking into the problem it looked like the following files had been overwritten:
    postgresql.conf
    pg_hba.conf
    changing the permission settings in theese files now partially solved the problem.
  2. We now can access the projects from inside unity. And i hope this can help someone else to not do the same mistake i did trying to reinstall the server.

After working with the server some more from another intel based macpro machine not running the server, commits and checkouts of small data amounts 1-5files seems okey. <5sec. same thing on the machine running the server. The update command on the machine that holds the server seems stable around 20sec still holding 11200 files where aproximatly half of it is uncommitted with a metadata filecount of around 20000. Removing the uncommitted resources locally involved 30sec “wait time” which felt rather fast considering the ammount of data, but we are still missing some info about whats going on.

After this the update from server command now involves arount 10sec “wait time”.
Duplicating one of the Pro standarad folders and calling the commit command now it took about 1min of “wait time” for the commit dialog to appear. And around 5sec “wait time” after the commit was executed.

The refresh command now takes around 5sec to execute.

Conclusion

The Asset Server wait time seems to be scaling with the ammount of metadata files that has to be built up around each asset. The more assets in the repository the longer the asset server wait time for every command that invloves syncronizing these files?
Is there a work-around for this?
What is the maximum filesize/items any of you guys are having in your AssetServer-projects.

I have searched to some extent on the forum but i cant find any posts with someone that has had similar experiance with larger projects inside the asset server.
So have anyone else encountered problems with slow response time from unity->assetserver when dealing with larger projects?
I cant say that it would be acceptable with more than 10sec “wait time” without giving the user some notification whats going on during commits. I could just guess that this has something to do with the metada that needs to be syncronized against the server somehow?

We also need a way to share revisioned assets-resources between windows and mac. Is there a viable solution for this using only the Asset Server?
Im considering writing a windows based client able to check out atleast the “head” reources of the assets from the asset-server-pgsql database if there is no other way. But this seems abit overhead when we already have subversion up and running and working nicely on both mac and pc…
How do you manage windows->mac version control?
Are you using subversion or some other versioncontrolsys. to store another copy of all the assets?

Im considering setting up unity under vm-ware under winXP with either linux or osx, have anyone tried this out successfully?

Solutions

  1. Use subversion to handle resources around unityprojects. Storing them outside the of unity and “streaming” them through the WWW class. The first thing that comes to my mind here is large amounts of audio assets and maby textures as this is supported out of the box.
    This and maby using a pgsql server for all the filedirectory structure data and more..
    Using the asset server to contain the metadata specific files such as prefabs and more static objects in the scene such as houses - terrain and more.

  2. Splitting up large projects into multiple small projects and contain them separatley on the Asset Server. Here the problem of sharing resources comes up, is this possible to do this with the asset server or do we have to zip the files into asset packages? If then is this a viable solution for shared data that will be updated on a quite regular basis?

Notes

There is an Auto-refrsh checkbox unchecking this did seem to help littlebit, but i guess its just som call to the refresh server view command?

Hate that my first post is in the “wining context”, but hey thats why support forum exists, right?

Any help is most welcome!

Cheers,
Tobias

Uh, what a long post :slight_smile:

Regarding Mac/Windows Asset Server: Until now there is no need to share the Assets on a Win machine as you can’t use them without Unity. Not sure why you want the assets on a Windows machine. But if you really, really want them, there might be a way to write a client using SQL to retrieve the stuff from the Asset Server.

Regarding your AS crashes: Hmm, not sure what happened. With out repositories it just works flawlessly, even with a couple of hundred megabytes in size within the repo. It takes only a few seconds usually until it updates. We’re running the AS on a Mac Mini connected to a DSL line and access it from outside even.

Regarding other SCMs for Unity: Don’t try it. We used in the beginning subversion and it was a mess in the end. The cache files get at some point corrupted and in the end we had a non-working project anymore. Although it might work in the beginning, it later kills you. And although we rebuild every time the project within Unity. From our experience, there is no way around using the AS when working in a team. Hence we (esp. Thomas from our team) wrote the additional AS commit notification mail tool that notifies each developer assigned to each AS project about updates.

Not sure my answer helps. But anyway :slight_smile:

Best,
Martin

P.S. You’re from germany? (Me = in Hamburg)

Hi Martin

Thanks for the answer.
The reason i want to run the asset server on a windows machine is because we dont want to buy a mac server as we already have a viable windows server solution with raid, backup and all that…

What i meant was, would it be okey to use svn to handle the assets of a project so that “windows users” involved in the project such as 3d animators, artists, sfx-team would also have a working version-control-system. What i was wondering is if anyone has tried this using the AssetServer for unity-metadata specific files (prefabs, scenes)? And svn for the “source material” (.fbx, .psd, .ogg)? Or would it be more viable to store a copy of the “source material” in the AssetServer and svn?

Really wierd that we get this latency-crash problems if you havent experianced any. Could it be a intel-mac problem? How many developers do you have using the asset server? Or that we are runnging the test server on the same machine as Unity?
Do you store any large file assets on the AssetServer like sound librarys/model librarys?
Really like the idea of being notfied of commits, thanks for contributing! :slight_smile:

Im from sweden so not too far if you take the bridge from denmark!

Cheers,
Tobias

Ah, ok. Yeah. Might work with a Postgres server on a Windows machine, not sure. You might get into trouble maybe because of character sets and stuff, not sure. Give it a try. :slight_smile:

Hmm, basically you can setup 2 different repos and merge them from time to time, that would work, like kind of setup a script to auto-merge stuff back into the AS. Not a beautiful way, but might work.

We’re 3 people working on the AS with multiple projects. Guess it’s not intel related as the Mini I’m using is an Intel one too.

And yes, we store even large files like huge models in the AS without the slightest problem.

Hehe, ok, then you’re more close to Thomas from our team who lives in Sweden right behind the Danish border and works in CPH or to Magnus from our team in Uppsala. :slight_smile:

Martin

Yes will try some diffrent solutions, thanks for the pointers.
Regarding the asset amount/size
whats the largest filecount you store in the asset server in a project?
We have had no problem using large files, but when the filecount exceeds 10k and with given metadata file count of 20k+ problems starts to show themselfs with the AssetServer.

I dont know how the asset server works but i can just guess that it needs to merge the metadata with the clients for each commit somehow? And im guessing this is why we get these problems.

// Tobias

We run the Asset Server on a Linux machine (CentOS, pretty boring hardware). We don’t have any delay on updates or commits. Our projects aren’t terrifically huge:

444 MB assets (2,087 items in Library/)
389 MB assets (1,372 items in Library/)

Hi Matthew

Nice that you got it running under linux. From my perspective it seems just like a postgresql server with some added functionality to handle syncronizing of metada from unity? Or is this done client side?
If so shouldn’t it be possible to run a postgres db under windows just aswell? Dumping the sql from the osx installation and importing it in the windows postgres db?

As stated before it seems like the problems start occuring for us when reaching the number ~20k metadata files in a project, has anyone else tried this?

Does anyone know if there is a special reason why the pgsql server uses ascii7 and not utf8 ?

pgAdminIII :
"Database encoding
The database overloadtest is created to store data using the SQL_ASCII encoding. This encoding is defined for 7 bit characters only; the meaning of characters with the 8th bit set (non-ASCII characters 127-255) is not defined. Consequently, it is not possible for the server to convert the data to other encodings.
If you’re storing non-ASCII data in the database, you’re strongly encouraged to use a proper database encoding representing your locale character set to take benefit from the automatic conversion to different client encodings when needed. If you store non-ASCII data in an SQL_ASCII database, you may encounter weird characters written to or read from the database, caused by code conversion problems. This may cause you a lot of headache when accessing the database using different client programs and drivers. For most installations, Unicode (UTF8) encoding will provide the most flexible capabilities. "

i can see problems with this when ppl commits things named “incorrectly”…

I also get warnings about that the table size indexing does not correspond well to the actual data elements in a table (or something like that) and that this could give performance issues.
And pgAdminIII wants to VACUUM …

Im no expert on postgres but could this be one factor of the preformance problems stated before?

Cheers,
Tobias

Im obviously abit over my head here, in deep sql waters, but hey…
Here goes:

Ive tried moving the pgsql based asset-server to windows.
It seems to work fine with the following exception:
Im missing the following unix “dll”
unity_extensions.so
when calling the guid2hex() function.
Im guessing this has to do with unity specific parsing of data?
Would it be possible to get the dll file ported to a win32 dll. Is there a timeframe on this?
If not would it be possible to get the asset server source and do the port for you? How much work would this involve?

pgsql import error-log:

pg_restore: [archiver (db)] could not execute query: ERROR: could not access file “$libdir/unity_extensions”: No such file or directory
Command was: CREATE FUNCTION guid2hex(bit) RETURNS character
AS ‘$libdir/unity_extensions’, ‘guid2hex’
LANGUAGE c IMMUTABLE STRICT;
pg_restore: [archiver (db)] could not execute query: ERROR: function public.guid2hex(bit) does not exist
Command was: ALTER FUNCTION public.guid2hex(bit) OWNER TO unitysrv;
pg_restore: creating FUNCTION has_role(text, integer)
pg_restore: creating FUNCTION hex2guid(character)
pg_restore: [archiver (db)] Error from TOC entry 31; 1255 16476 FUNCTION hex2guid(character) unitysrv
pg_restore: [archiver (db)] could not execute query: ERROR: could not access file “$libdir/unity_extensions”: No such file or directory
Command was: CREATE FUNCTION hex2guid(character) RETURNS bit
AS ‘$libdir/unity_extensions’, ‘hex2guid’
LANGUAGE c IMMUTABLE STRICT;
pg_restore: [archiver (db)] could not execute query: ERROR: function public.hex2guid(character) does not exist
Command was: ALTER FUNCTION public.hex2guid(character) OWNER TO unitysrv;

Cheers,
Tobias

edit

i digged this up:
http://forum.unity3d.com/viewtopic.php?t=9335&highlight=assetserver
could it be related?