Why is my self-hosting so slow?

What do you need help with?

Hello everyone,

I recently joined the Anytype community and tried to self-host the software. Since I have a certain technical background, I quickly completed the deployment of the self-hosted network, and everything appears to be running normally on the client side.

However, one thing confuses me: my server has a bandwidth of 300Mbps for both upload and download, but when I upload a file on Anytype to test the speed, the upload and download speeds only reach a maximum of 5MB/s, which is about 50Mbps. At first, I thought this was an issue with my network configuration, so I followed standard maintenance steps to check all gateways. Strangely, all gateways are functioning normally, and when I download files directly from the server, the speed easily reaches over 20MB/s. Only within Anytype does file upload and download seem especially slow. I’m certain that my server and I are physically very close, and both TCP and UDP latency are low.

Is this a unique case that only happens after I self-host? I’m located quite far from the official servers, so my network speed to them is very slow, making it difficult for me to test if this is also the case between the official server and my own. If anyone is near the official servers and in a good network environment, what download speeds are you getting? Can they reach very high speeds, or are they at a more typical rate, like 15MB/s to 20MB/s? If the official server has a similar speed limit, regardless of proximity, then I might stop looking for issues on my end, it might be that certain encryption policies or other server-side processes are slowing down the speed. If it is indeed a configuration issue on my part, please let me know. Thank you very much.

Here are my server specifications:

CPU: Xeon® Platinum 8171M @2.60GHz

Memory: 32 GB

Core count: 26

Dedicated network bandwidth: :up_arrow:300 Mbps :down_arrow:300 Mbps

Also, I want to clarify that everything is functioning, just not achieving the speed I expected from my own hosted server. There are no visible errors within any Docker containers or on the client causing network interruptions. I hope that the community or team can communicate efficiently on this basis.

OS

Debian 12

Anytype Version

latest

Network Mode

Self-Hosting

Technical Information

I’m just wondering what level of download speed you can reach on your self-hosted server or very close to your official server

Self-hosting Links

Repo - All self-hosting resources

Usage Guide - Step by step instructions

Self-host Wiki

FAQ - List of frequent questions Troubleshooting & FAQ · anyproto/any-sync-dockercompose Wiki · GitHub Community Support - Find help from our devs and other members - Report Bugs
Issues · anyproto/any-sync-dockercompose · GitHub

Basic Documentation - simple overview for initial setup
https://doc.anytype.io/anytype-docs/data-and-security/self-hosting/self-hosted

Thank you very much, but that doesn’t seem like the thing I wanted to ask.

This report has been added to our issue tracker and received by the Development Team.

A few questions:

  1. Which implementation and version of the self-hosted setup are you using?
  2. What OS version are you using on the client?
  3. How exactly are you measuring the speed?

I am using the default prod version, which corresponds to the following versions in the environment:

ANY_SYNC_NODE_VERSION=v0.4.8

ANY_SYNC_FILENODE_VERSION=v0.8.1

ANY_SYNC_COORDINATOR_VERSION=v0.4.2

ANY_SYNC_CONSENSUSNODE_VERSION=v0.2.0

ANY_SYNC_TOOLS_VERSION=latest

MONGO_VERSION=7.0.2

REDIS_VERSION=7.2.0-v6

MINIO_VERSION=RELEASE.2024-07-04T14-25-45Z

For my mobile client, I’m using version 0.33.24, and for the desktop client on Windows, I am set to keep the latest stable version (non-preview), which is 0.43.4.

My testing method is quite simple: First, I upload a 1GB file in the notes section and observe the upload speed. After the upload is complete, I go to settings to clear all local files, close the client, reopen it, and click on the file to observe the download speed.

Since my server is currently idle, I can provide my server’s SSH key if necessary. It has a running Docker container and already generated client configuration files.

I feel that the Anytype client is not very proactive in terms of uploading to or downloading from a self-hosted server, even when bandwidth is ample. When UDP quality is poor, Anytype tends to become very slow due to the poor state of the QUIC protocol. In fact, if Anytype were to actively attempt connections, try multi-threaded uploads and downloads, and increase the number of connections without hesitation, it would allow the self-hosted server to achieve optimal speed. Perhaps a related configuration option could be provided to fully utilize bandwidth performance.

Can we optimize this issue by enhancing TCP transmission for files? The reason I identified is that it’s caused by poor UDP transmission quality.

Having opened an issue on Github

sorry for the late reply, I missed this thread :expressionless_face:
we ran the tests and didn’t find any significant speed degradation.
the maximum speed seems to cap at around 100 Mbit/sec (up to 160 Mbit/sec on macOS M1).
this is more of a client-side limitation than a server-side one - when working with files, the client becomes CPU-bound.