SDK uploads are slow due to not filling the TCP window
complete
bd_
SDK uploads are significantly slower than uploading directly to S3 - in my measurements, I can upload at 10-15mB/s from home via the S3 console, but only about 900 kB/s via the SDK (both 2018 and 2019 SDKs). This is worse at higher latency - via mozilla VPN to Japan, I upload at around 1.5-1.8 mB/s via S3 console, and 245 kB/s via the SDK.
Looking at the SDK upload traffic in wireshark (see screenshot), S3 is offering a ~815 kilobyte TCP window, but the SDK is only writing fast enough to have 70 kilobytes in flight (from my home connection). It's unclear to me whether your HTTP library is artificially setting a limit on in-flight bytes for some reason, but there very clearly is something wrong here.
Photo Viewer
View photos in a modal
Log In
Tupper - VRChat Head of Community
marked this post as
complete
Fixed in the 2019 SDKs.
T
TCL
marked this post as
in progress
Tupper - VRChat Head of Community
marked this post as
tracked
bd_
Here's an editor script to fix this. Just chuck this in an Editor/ directory and uploads will be nice and zippy.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
public class MakeUploadsFast : MonoBehaviour
{
static MakeUploadsFast()
{
BestHTTP.HTTPManager.SendBufferSize = 1024 * 1024;
}
}
Faxmashine
Thanks bd! Here's a formatted version (from your gist at https://gist.github.com/bdunderscore/a08be914837bd61dfd009e720384179c)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
public class MakeUploadsFast : MonoBehaviour
{
static MakeUploadsFast()
{
BestHTTP.HTTPManager.SendBufferSize = 1024 * 1024;
}
}
bd_
It's worth noting that the transmissions are well-correlated with ACKs, so it's likely that this is an artificial limit somewhere.
Photo Viewer
View photos in a modal