Skip to content
Snippets Groups Projects
Commit 6fc246cb authored by Trile Ro's avatar Trile Ro
Browse files

[+][FCB] Cats effects was giving warning on starvation, increase throughput...

[+][FCB] Cats effects was giving warning on starvation, increase throughput performance for delta messages via chunks

+ 1st it was attempted to make it fully granular, but...it does not behave well. Keep it in a branch and check another time.
+ It feels like every message on the redis stream opens a whole IO thing and the controller was eating all the memory very fast.
+ By grouping/chunking the problem gets put under certain control.
+ Testing showed to handle 20K delta items with grace, not instant, but gracefully. Felt like a good balance for redis and the controller.
+ Smaller chunks was giving starvation warnings, larger it's quite impactful on memory due to deser.
+ Maybe it's time to do binary streams, specially in this particular area of the code.
+ In any case, 500 chunks handles 20K properly. Still not the desired performance, but also, IPFS cluster is quite a bottleneck here.

It's kind of a tricky problem. Newcomers, specially big members with over >100K files might find it unstable to put their shared folder online and this would be their very first experience with the software...
But also...what are the chances that such a big member would it find unacceptable to have to chunk their file population?
Still, no compromise, aim for handling millions of files with no problem.

What's left then is:
+ Checking why does the CPU starvation happens. In >100K cases, the problem will still be there.
+ Binary streams. RPC to the rescue? This would need some serious metrics.
+ At some point, the file tree resolution will also act as a bottleneck. For 15K it's 2MBs in Redis and quite some memory pressure in controller's backend. Some solution will be needed here at some point.
parent b9548884
Branches
No related tags found
No related merge requests found
Showing
with 122 additions and 49 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment