Mesh Caching test
Jump to navigation
Jump to search
Scope
The Mesh Cache saved to VFS. The purpose of this test is to confirm that Mesh data is being cached where expected and when objects are in the cache those objects are retrieved from the cache and not re-requested. Also that expected behavior is occurring when the Mesh Cache is empty and full and any performance differences when viewing cached data.
Confirm Mesh Cache Tests
Using Show Render Display
- The Mesh Cache data can be viewed in Develop > Show Info > Show Render
- Log into area where you are not viewing or near any meshes. Confirm the mesh cache should indicate 0 / 0 Mb read/write (or close to it)
- Import a mesh that is is larger than 4 kb (duck.dae will work) and rez the object in-world to an area where there are no other objects that will be added or removed during the test.
- In Preferences > Setup select the Reset button next to Cache location to clear the cache (requires relog)
- After login, view the rezed mesh and observe the change in MB Mesh data received - that is the size of the mesh in MB
- Confirm that that amount was also written to the cache in the Read/Write section
- Delete the object
- Rez the same object again and confirm that no change is seen in the MB Mesh data received also no change should be seen in the MB written to the cache. Confirm that MB Mesh cache read is the equivalent of the size of the mesh minus ~4 kb - the first 4 kb are fetched and cached previously when getting the header. This would confirm (according to the values displayed in the console) that the mesh cache was being used to retrieve the mesh object.
Note: Because the first 4 kb of a mesh is fetched and cached when getting the header, if the whole mesh is under 4 kbytes subsequent loads just pull from the cache (or if some LOD of the mesh fits in the first 4 KB) and no additional data is written to the cache for that mesh. Important to take this into account when confirming expected values in the Show Render display.
- Log out
- Log back in to same location
- Confirm 0 MB of mesh data is received and 0 Mb written to the cache - the amount read from the cache should be consistent with the size of the mesh minus the 4 kb header
- Log out
- Clear the cache
- Log in and fly around a region with several mesh objects
- Observe and record the values for Mesh Data received and Mesh cache read and write
- Log out and log back in and observe roughly the same Mesh data
- Confirm that the the Show Render console that this mesh data is being read from the cache. There may be some additional mesh data received and written to the cache if not viewing exactly the same scene as in previous session.
Using VFS
- In Preferences>Setup change the cache size to 1024 MB
- Close the Viewer and relog in
- In the SecondLife/logs folder open the SecondLife.log file
- Search for VFS and confirm the line initCache: VFS CACHE SIZE: 204 MB is present
- Confirm that whatever cache size is set, the VFS Cache Size is always 20 % of that value.
- In the /Caches/SecondLife folder confirm there is a file named like data.db2.x.106525339 which will match the VFS Cache size. The VFS Cache is initialized to the maximum size it allows. The Cache space is then chopped into blocks and managed by a list with a file name like index.db2.x.106525339. Every time new data is added to the cache, the VFS looks at the list for a free block which has enough space. If not, the VFS looks for the list to free an oldest block which is big enough.
- Log in and enable the Advanced Menu (CTRL ALT D) and open the Show Debug Settings
- Set the CacheSize to 6 and relog
- Confirm in the files listed above the VFS Cache is set to 1 MB
- Log into a region with a large amount of Mesh data like Mesh Sandbox 2 on Aditi
- Open the Develop > Show Info > Show Render Info console
- Rotate or fly around and observe the MB of Mesh data received will show around 7 MB and the MB Cache Written will be around 2 MB. This shows that all the Mesh data received could not be written to the Cache and the Mesh cache is full allowing to test that behavior.
- Confirm that all expected Mesh data is viewed and viewer performance is normal
- Start to fly around or teleport to another mesh region and confirm that you continue to see Mesh Data received in the console and data being read and written from the cache (which indicates the process of freeing older blocks in the cache to make room for new blocks is being performed).
- Confirm that all expected Mesh data is viewed and viewer performance is normal
- Log out of Mesh Sandbox 2 in a location that data would have been written to the cache (at least as much as could be).
- Log back into same location and confirm that you see data written to the cache (which fills the cache up with the current mesh data removing older data)
- Now reset the CacheSize variable to the default 512 MB and relog
- Repeat the above steps on Mesh Sandbox 2
- Observe that when you log in with a reset cache, the MB Mesh Data Received will match the MB mesh data written to cache since there is now plenty of room in the larger cache.
- Log out and log back in and confirm that the MB Mesh data received and MB written to cache are very small since most of that data would already be in the cache
Performance
- Fly around a region with several mesh objects present - this should load these items into the cache
- Log out and log back in to the same region and observe the viewer performance of loading the same mesh objects
- Clear the cache and log out
- Log back in to the same area and view meshes in the area
- Note any differences in performance in terms of viewer load times and how fast meshes are showing in view between cached and non-cached meshes (this may be difficult to observe - large mesh objects may reveal this improvement more?)
- Find large mesh scenes to confirm data is being read in Show Render display and note any performance issues
Meshes Linked to Prims
- Confirm that a mesh object linked with a prim object shows the same expected values for data read and written to mesh cache.
Rigged mesh
- Log in 2 users
- Have one user wear a rigged mesh such as simplebot.dae
- Confirm that another user viewing the rigged mesh shows Mesh data received and data written to Mesh Cache in Show Render Display
- Confirm that the user wearing the mesh also sees Mesh data received and data written to Mesh Cache in Show Render Display