Tech Talk

OS X 10.10.2 returns frame rate to OpenSim viewers

OS X 10.10.2 released by Apple today, returns performance to all third party viewers for OpenSim and SecondLife grids, in some cases as much as 20 frames per second (fps) depending on viewer. We have tested just about all viewers during the beta phase of 10.10.2, and the increase became evident with updated graphics drivers in late beta testing. Also the SecondLife official viewer saw a nice performance increase. 

OS X 10.10.2 also patches security issues reported by Google in addition to one that could take advantage of a vulnerability in the Thunderbolt hardware. The Thunderbolt exploit could only be performed if you had physical access to a machine and could connect a Thunderbolt drive. 

The update is also set to correct Wi-Fi connectivity issues, stop Spotlight from loading remote content in email messages if disabled, and adds the ability to browse iCloud drives in Time Machine. 

10.10.2 is a recommended upgrade for all Mac users who have upgraded to Yosemite (10.10), and also for those who have held back upgrading from earlier system versions.

Bulletsim physics running on OS X again

Running bulletsim on OS X has been impossible because the libBulletSim.dylib library distributed with OpenSim had a pesky memory leak that could allocate as much as 5 MB/sec exhausting the address space of 32-bit mono in a matter of minutes for some configurations. 

The BulletSim developer, Robert Adams, also known as Misterblue finally managed to compile an updated version without the memory leak after xmir grid had provided for him a build environment for building 32-bit dylibs with the now deprecated GCC 4.2.1 compiler in Apple’s Xcode. 

The build environment is installed on a system running OS X 10.8 with Xcode 4.6.2 and some library patches from Xcode 4.3.3. This also happens to be the build environment Linden Lab use to build their current versions of the SecondLife viewer for Mac.

BulletSim

Bulletsim is the version of the Bullet physics engine optimized to work with OpenSim, and should over time provide much better physics for avatars, vehicles and other objects that behave like physical objects (being influenced by gravity) compared to the ODE physics engine that was previously the default up to OpenSim version 0.8.

The Bullet physics engine is also included in Apple’s SpriteKit and SceneKit providing physics capabilities for games on OS X and iOS built on those frameworks. A short demo of how physics is applied to particles and objects in an iPad game can be seen in this demo.

VAR regions now also possible on OS X

Having bulletsim working also for OS X based installations of opensim also makes it possible to use another feature of OpenSim 0.8; VAR regions. 

A VAR region is a region that extends over a number of the standard size 256x256 meter region. Currently the number of standard regions in a VAR region must be multiples of 256 for a maximum of 8192 and they must be square. This makes it possible to tile the standard regions in 2x2, 3x3, 4x4, 5x5 and so on up to a maximum of 32x32. Because of increased CPU and memory use for a VAR region, many find that a 4x4 tile is the maximum practical tile they want to use.

The big advantage of a VAR region is that you can navigate the entire region without the lag and effects of region crossings, making them ideal for driving, sailing and other activities requiring large areas without interruptions. 

Note that only a few viewers supports VAR regions. 

Where to get the updated dylib?

The updated libBulletSim.dylib has yet to make it into a release version of OpenSim, so you will have to pull it from the OpenSim Master branch which can be found at git in the OpenSim repository.

Use the "Download ZIP” button to download to your local machine and navigate to the “opensim/bin/lib32” folder to find the updated libBulletSim.dylib

To replace the old file with the new one, copy the updated libBulletSim.dylib into the bin/lib32 folder of your OpenSim installation. 

To enable bulletsim, make sure that the line that contains physics = bulletsim is uncommented in the [Startup] section of OpenSim.ini so it looks like this

;; Choose one of the physics engines below

 ;# {physics} {} {Select physics engine} {OpenDynamicsEngine BulletSim basicphysics POS} BulletSim

    ;; BulletSim is the default physics engine.  It provides the best performance and most functionality.

    ;; BulletSim supports varregions.

    ;; OpenDynamicsEngine was the previous default physics engine in OpenSimulator 0.7.6.1 and before.  

    ;; It continues to provide a workable physics implementation.  It does not currently support varregions.

    ;; basicphysics effectively does not model physics at all, making all objects phantom.   

    ;; Default is BulletSim

    ; physics = OpenDynamicsEngine

     physics = BulletSim

    ; physics = basicphysics

    ; physics = POS


Your [BulletSim] section of OpenSim.ini should look like this

[BulletSim]

    UseSeparatePhysicsThread = true

    TerrainImplementation=0


After making these changes you should be able to successfully start up opensim in the usual way with BulletSim enabled. 

Please contact me here or in-world at xmir if you have questions or need help to get this set up on your OS X system. 

OpenSim on mono 3.12 OS X keeps more files open

After running OpenSim on mono 3.12 for a while my recommendation is to increase the number of allowed open files mainly to prevent a crash during startup.

My current recommendation is to allow for a max of 4096 open files per process. Use the following command in terminal from a privileged account to set this.

sudo launchctl limit maxfiles 4096 65536

Make sure to log out and back in the account OpenSim is running under before (re)starting it. You can check allowed open files with the command ulimit -a 

The increased limit is because a large number of cache and other files are opened/created during the startup phase of OpenSim. You will typically see this when generating map tiles, generating physics for in-world prims and meshes, and when compiling scripts. 

NOTE: The above command sets the allowed open files at the system level, which also sets it for terminal logged-in sessions as can be seen by the ulimit -a command. If you for some reason need to increase the number of open files for applications running on your OS X desktop, you have to increase the number by using the launchctl limit maxfiles 4096 65536 command in a terminal session for that logged in user, or a suitable plist placed in ~/Library/LaunchAgents to make it persistent across logins. A non-privileged user cannot set the limits higher than the max system limits. 

Mono 3.12 is out

The mono-project has announced mono version 3.12.0 is out with a number of enhancements and bug fixes. 

Highlights for this version are 

  • Major performance and memory consumption improvements on SGen.
  • Improve the heuristic of the ThreadPool to maximize efficiency and minimize the number of Threads
  • Experimental preview on new Windows installer

For OS X users there is a special treat in the experimental FileSystemWatcher that relies on kqueue, which can significantly improve performance of opensim features such as the flotsamcache and other file system related operations with many accesses and high concurrency. This feature may require increasing the number of file descriptors for the account running mono. This can be done with the launchctl limit command. 

The full release notes can be found here

Mono 3.12 is currently being tested on the xmir test grid. 

Manage your OpenSim MySQL database with Navicat iOS

A few weeks back Navicat, a company that has specialized in desktop tools to manage databases, took the plunge and launched its first database management tool for iOS. 

After a few iterations of bug fixes and performance enahncements, the $9.99 app let you manage your MySQL databases both from an iPhone and iPad. 

With Navicat iOS you can create, modify, and design database objects using professional object designers, available for objects such as Tables, Views, Functions, and Events.

Adding, modifying, and deleting data is easy with the iOS-centric UI. Easily edit data cells directly in Grid View or open the record in Form view. With the ability to zoom in and out of data tables, you can modify the workspace for optimum clarity.

Search for specific data entries with the search function, or use the filter to isolate broad data groups. Anchor and view connected databases using foreign key relationships. Without the need to constantly cross-reference a master table, you can optimize your workflow and productivity.

Editing a record in an OpenSim database is a snap on the iPad

Connection Options

Navicat iOS allows you to establish secure SSH/SSL sessions through SSH/SSL Tunneling, ensuring strong authentication and secure encryption between two hosts. Navicat also comes with HTTP Tunneling, giving you the flexibility to bypass ISP restrictions on direct database server connections.

Better organized with Navicat Cloud

Navicat Cloud let you syncronize your connections and queries across devices. You can start your work on the desktop version of Navicat that is available both for Linux, Mac and Windows, syncronize to Navica Cloud and pick up your queries on your iPad or iPhone when on the run to continue work there. For your 150 first devices this functinality comes for free. 

MySQL monitoring right in your pocket

With Navicat iOS you are able to connect to multiple databases and monitor them with the built in monitoring tools right in your pocket. Comes pretty handy when your grid starts slowing down and you are nowhere close to your PC or console.

Monitor  MySQL performance when on the run for multiple connections.

While we are waiting for support for more databases, be sure to check out the MySQL version in the app store or get more information from the Navicat iOS information site.

hypergrid address: hop://grid.xmir.org:8002                                             xmir © 2014-2022