[-] phiresky 12 points 3 months ago

The ActivityPub protocol lemmy uses is (in my opinion) really bad wrt scalability. For example, if you press one upvote, your instance has to make 3000 HTTP requests (one to every instance that cares).

But on the other hand, I recently rewrote the federation queue. Looking at reddit, it has around 100 actions per second. The new queue should be able to handle that amount of requests, and PostgreSQL can handle it (the incoming side) as well.

The problem right now is more that people running instances don't have infinite money, so even if you could in theory host hundreds of millions of users most instances are limited by having a budget of 10-100$ per month.

[-] phiresky 13 points 3 months ago* (last edited 3 months ago)

Interoperability is great, but sadly there isn't really any organized group effort to standardize more aspects / extensions of ActivityPub. AP is really "thin" in that it barely prescribes anything. There's not even a test suite to test whether software complies to the spec of AP.

So everyone kind of does their own thing, and fixes interoperability on a case-by-case basis. This makes it kinda frustrating to spend time on - lemmy already has special cases for many different softwares (peertube, mastodon, ...) and every one increases the complexity.

[-] phiresky 14 points 3 months ago

There is a ton of decentralized projects that no one has really ever heard of, new ones pop up all the time (I was watching multiple of them in the past). Sadly in most cases it seems like most authors stop working on their projects after a while.

The same ideas have existed for a long time but both decade old projects (ever heard of Freenet? Probably no) and new ones . Many of them are very ambitious and try to replace huge swaths of things (not just file storage but also social aspects, web of trust, etc) but then collapse under the complexity. IPFS is the most well known new project and (good imo) has limited its scope, but sadly (still) suffers from huge scalability issues, some of which are deep in the design.

I think it's really hard to align incentives there - the nicer it is the harder it is to make money with it. So either these projects tend towards control by one entity or they tend towards death.

Really the only one that seems to have a long lasting life so far is torrents. Which are amazing. And Email if you want to count that.

[-] phiresky 12 points 3 months ago

Personally I came with them so I guess they are my people ;)

[-] phiresky 13 points 3 months ago

I don't think we found any specific groups of people attacking Lemmy. I personally just saw one or two what looked like individuals trying (and succeeding) to take Lemmy down with a few very simple requests that forced Lemmy to do lots of compute (something like fetching the next million posts from page 10000). The fixes for those were simple because it was just missing limits checking.

I'm not sure if there actually was a larger organized attack. Lots of performance issues in Lemmy simply appeared simultaneously and compunded each other with a rapidly growing number of active users and posts.

[-] phiresky 16 points 5 months ago* (last edited 5 months ago)

I can understand not having the energy to care about long messages from companies enough to notice stuff like this. Everyone is forced to look at tons of text / media from companies every day demanding your attention, "news" about stuff to get you to spend more time with company products, mixed in with ads, fake "updates" just for you personally to trigger reactions in your brain that make you feel like something social is happening. So many buttons you get shown about agreeing to something or acknowledging something or some terms you've never read having changed vaguely with "we care about you", intentionally obfuscating which ones you're legally allowed to deny and which ones are going to be forced down your throat in any case.

They added this feature as an opt-out in order to capitalize on your existing relationship with your friends to redirect that social attention to their corporate interests. I'm happy there's backlash, regardless of whether a user could have theoretically stopped it.

1539
submitted 6 months ago by phiresky to c/[email protected]
[-] phiresky 17 points 7 months ago* (last edited 6 months ago)

That is exactly what's happening :) better quantization matrix results in 25% smaller files with the same perception-based q which makes webp kinda useless often https://siipo.la/blog/is-webp-really-better-than-jpeg

Try jpeg-xl though. it's amazing.

[-] phiresky 16 points 9 months ago* (last edited 9 months ago)

I want to clarify that most/ a lot of the DB work of this release actually came from others e.g. nutomic, RocketDerp, Sh4d, sunarus ;)

45
submitted 10 months ago by phiresky to c/[email protected]
398
Posting to Lemmy be like (self.lemmyshitpost)
submitted 10 months ago by phiresky to c/lemmyshitpost
[-] phiresky 907 points 10 months ago* (last edited 10 months ago)

server load is too low, everyone upvote more stuff so i can optimize more

edit: guess there is some more work to be done ๐Ÿ˜

46
submitted 10 months ago by phiresky to c/blender
[-] phiresky 49 points 10 months ago* (last edited 10 months ago)

I want to say that with 0.18 the definition of federation_workers has changed massively due to the improved queue. As in, whatever is good in 0.17 is not necessarily good for 0.18.

On 0.18, it probably makes sense to have it around 100 to 10'000. Setting it to 0 is also be an option (unlimited, that's the default). Anything much higher is probably a bad idea.

On 0.18, retry tasks are also split into a separate queue which should improve things in general.

0 might have perf issues since every federation task is one task with the same scheduling priority as any other async task (like ui / user api requests). So if 10k federation tasks are running and 100 api requests are running then tokio will schedule the api requests with probability 100 / (10k+100) (if everything is cpu-limited). (I think, not 100% sure how tokio scheduling works)

[-] phiresky 17 points 10 months ago

well internally (in the context of activitypub) they are called "groups" ๐Ÿค“

7
submitted 10 months ago by phiresky to c/[email protected]

Here's how you can profile the lemmy server cpu usage with perf (a standard linux tool):

Run this to record 10 s of CPU samples: perf record -p $(pidof lemmy_server) --call-graph=lbr -a -- sleep 10

Then run this to show the output perf report.

Screenshot example:

Post your result here. There might be something obvious causing high usage.

[-] phiresky 35 points 10 months ago
1
submitted 10 months ago by phiresky to c/heatpumpmemes
2
submitted 10 months ago by phiresky to c/heatpumpmemes
4
submitted 10 months ago by phiresky to c/heatpumpmemes
view more: next โ€บ

phiresky

joined 11 months ago
MODERATOR OF