beeeen
beeeen5mo ago

How to optimize normcore?

We're looking to reduce the amount of bandwidth that we use. What are some good practices to reduce the amount of bandwidth being used? What are some good practices to reduce the cost of normcore for our use case?
9 Replies
kapa.ai
kapa.ai5mo ago
Hi @beeeen. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To optimize Normcore and reduce the amount of bandwidth being used, you can consider the following practices: 1. Datastore Frame Duration: The rate at which updates are serialized and sent out is set by the datastoreFrameDuration property. The default value is 1.0/20.0 which sends updates at 20hz. Setting this value lower results in more frequent updates, but also higher bandwidth usage. If you're running a local installation, values up to your render framerate can be acceptable; however, you'll rarely want to send updates more often than 20hz. Typically, even 10hz works well with Normcore. You might want to experiment with this value to see if it improves the update delay. source (https://normcore.io/documentation/room/datastore#delta-updates) 2. Congestion Control: Normcore uses WebRTC which implements congestion control. This means it can automatically adjust the rate at which updates are sent to the server to utilize the maximum bandwidth available while still keeping updates smooth for users with poor connections. If your network is congested, this could be slowing down your updates. source (https://normcore.io/documentation/architecture/transport#webrtc-implements-congestion-control) To reduce the cost of Normcore for your use case, you can consider the following: 1. Room Hours: Room hours refer to the total number of hours that a room server is running and clients are connected. If no one is actively connected to a room, the room server shuts down after 30 seconds, and you stop being charged for the room. So, managing your room hours effectively can help reduce costs. source (https://normcore.io/documentation/pricing) 2. Changing Plans: Normcore offers different pricing tiers. You can change plans at any time in your billing cycle so Normcore can best meet your needs. Changes in room-hour and bandwidth limits take place immediately. For instance, you will be able to exceed the fixed limits right away if you switch from Pro to Unlimited, even in the middle of a billing cycle. However, if you switch from Pro to Free, the change will occur at the end of the month to allow you to take advantage of the bandwidth and room hours that you've already paid for. source (https://normcore.io/documentation/pricing) 3. Firewall Rules: If you're having trouble connecting to Normcore's servers on a corporate network, make sure the following IP ranges and ports are enabled. This can help ensure a high-quality connection for all players and prevent unnecessary data usage. source (https://normcore.io/documentation/architecture/firewalls) Remember, optimizing Normcore involves a balance between performance and cost. It's important to monitor your usage and adjust your settings and plans as needed to find the best fit for your specific use case. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai5mo ago
<@690217885540417680> kapa.ai is still learning and improving, please let us know how it did by reacting below
maxweisel
maxweisel5mo ago
First step is to identify what’s actually using bandwidth take a look at the Normcore Unity profiler modules they’ll show you send and received bandwidth and you can use that to figure out what parts of your application have heavy bandwidth use
beeeen
beeeenOP5mo ago
Where can I find those profiler modules?
maxweisel
maxweisel5mo ago
We're still working on the guide for it, but if you open the Unity profiler, (make sure you're on the latest version of Normcore), you should see them there / there's a menu in the profiler to enable/disable modules and they'll be in that list.
cryptomax
cryptomax5mo ago
Audio with rooms full of people is by far the biggest data usage in our experience So rooms with lower player counts will help because the data is exponential based on player count in the room
beeeen
beeeenOP5mo ago
@Normcore Assistant, how exactly can I change the datastoreFramDuration property?
kapa.ai
kapa.ai5mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The datastoreFrameDuration property is a part of the Room class in Normcore. You can adjust this property in your script where you have access to the Room instance. Here's a simple example of how you might do it:
// Assuming you have a reference to the Room instance
Normal.Realtime.Room room = ...; // get your Room instance

// Set the datastoreFrameDuration property
room.datastoreFrameDuration = 1.0/30.0; // for example, to send updates at 30hz
// Assuming you have a reference to the Room instance
Normal.Realtime.Room room = ...; // get your Room instance

// Set the datastoreFrameDuration property
room.datastoreFrameDuration = 1.0/30.0; // for example, to send updates at 30hz
Remember, setting this value lower results in more frequent updates, but also higher bandwidth usage. You'll rarely want to send updates more often than 20hz. Typically, even 10hz works well with Normcore. You can find more details about the Room class and its properties in the Normcore Documentation (https://normcore.io/documentation/reference/classes/Normal.Realtime.Room). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai5mo ago
<@690217885540417680> kapa.ai is still learning and improving, please let us know how it did by reacting below