announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    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.

    12
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    So far it doesn't seem like any company actually wants to compete in this space (longer-form somewhat text-focused communities). Even reddit is trying to become more twitter and less reddit.

    7
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    I agree that it's not ideal to be hosted on a platform controlled by Microsoft, but it's just a fact that you lose 90+% of contributors if you are anywhere else (there's an article where someone compared, can't find it right now). It's not great that that's how it is, but you need to choose your battles.

    I'm not really very concerned, since git itself is decentralized, and if Github starts causing visible problems moving somewhere else is not a huge problem. Also VPNs exist.

    13
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    I'm not aware of philosophical disagreements with that feature, I can just think of logical and technical issues. Like how moderation would federate, etc. If all the mods come to an agreement then the mods on one instance could lock their community and link to the other one. If the mods disagree, then moderation is going to be chaos in any case, no?

    I think multi-community views would be a great idea.

    6
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    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.

    13
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    Lemmy is somewhat protected by being an AGPL-licensed project, preventing proprietarization. If there's ever a relicensing effort, ba fearful.

    I'm not sure what exactly becoming a organization would entail, but so far I'd say the development part is not really large enough? For me I would start being suspicious when a significant amount of dev power came from compan(ies), but so far no company has shown any interest afaik.

    There's already been a few forks, for example lemmynsfw has made some changes on their side, which nutomic is now looking to integrate back into lemmy.

    11
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    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.

    14
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    I think flairs would be the same as user-tagging. There's an open proposal for post-tagging https://github.com/LemmyNet/rfcs/pull/4 and the discussion there was so far to add tagging for one type of thing and then later expand to others (like user tagging).

    It's a bit of a complicated feature because it needs decision who can tag whom, and what is the scope (who is it federated two), and how does it transfer / interact with other ActivityPub software.

    11
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
    announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    I don't think it's that large. Text is very small and compressible compared to images. Well it depends on if you mean the actual database storage (uncompressed, with indexes) or a compressed copy of all the posts. You can see the post number in the URL, which on lemmy.world for this post is 11169622. That means there's around 11 million posts total in lemmy.world's database. If you assume each of them takes 0.5kB of storage that would be only ~ 5 GB of posts.

    9
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    0.19 was a bit of a special case because there was a set of breaking updates that had to be done at some point, and trickle releasing breaking changes isn't really great either. Usually hopefully the breaking changes are rare, so releases can be more frequent.

    10
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    For migration we recently added a feature to export your user data. But "real" migrating accounts is something I put on our "todo" list, though it probably also first needs a proposal to define how it should work exactly (should it still work when the original instance is down?) As soon as we start giving users more control over their private key issues start appearing like not having any infrastructure for key rotation / revocation. Without that it will only work when the original instance still exists.

    I'm not sure if by tagging users you mean linking / mentioning them? Or adding tags to them like you can tag posts / users on other platform. For tagging in general there's a pending proposal https://github.com/LemmyNet/rfcs/pull/4 . So far it focuses on post tagging though to reduce the scope. I think the goal is going to be to start with one kind of tagging and add more kinds of tagging later.

    For improving cross-instance linking (both communities, posts, and users) we also have a open milestone. There's a few spitballing issues about it, but no real concrete proposal on how to build it yet.

    7
  • announcements Announcements Lemmy Developer AMA and Dev Update, 2024-01-26, 1500 CEDT
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    8 months ago 100%

    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.

    14
  • 196 196 I r(ul)efuse
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    10 months ago 100%

    Remember though that butter is only 80% fat. Especially relevant for baking recipes where you have a ton of butter and if you replace that can make it denser and greasier. E.g. 200g butter you should replace with ~160g oil and 40ml water.

    1
  • plex Plex Plex Users Fear New Feature Will Leak Porn Habits to Their Friends and Family
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    10 months ago 100%

    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.

    13
  • asklemmy Ask Lemmy Why are 90% of the images WebP format?
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    11 months ago 100%

    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.

    17
  • programming Programming Big projects are ditching TypeScript… wtf? - The Code Report
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 83%

    If that's what this video is about then it's a lie (I'm not going to watch that bait). Svelte did not move away from Typescript. Svelte just moved from TSs custom syntax to TS-in-JSDoc. They are still using the same types and TS compiler to fully enforce type checking their code.

    Their reason isn't that TS is bad, just that the IDE experience is bad redirecting you to .d.ts instead of source files for libraries.

    4
  • announcements Announcements Lemmy v0.18.3 Release
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 100%

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

    41
  • lemmyworld Lemmy.World Announcements Lemmy.world status update 2023-07-05
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 100%

    it's not really officially supported, but both lemmy.world and lemm.ee are running with this configuration (multiple lemmy-ui and lemmy_server instances, one pg database).

    2
  • lemmyperformance Lemmy Server Performance De-facto memory leak
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 100%

    a large part of the queue going unbounded is due to the retry queue and missing checks if the receiving servers are actually available. quick fix is disabling the retry queue which is currently making it not go unbounded on lemmy.world

    storing the queue persistently is somewhat of a separate issue since that doesn't much affect whether or not it can be processed in time.

    also a ton of the memory use was (and is) due to inefficient sql queries.

    5
  • lemmyworld Lemmy.World Announcements Lemmy.world status update 2023-07-05
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 99%

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

    edit: guess there is some more work to be done 😁

    815
  • lemmyworld Lemmy.World Announcements Federation troubleshooting
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 100%

    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)

    24
  • nostupidquestions No Stupid Questions Are we sticking to communities?
    Jump
    lemmyperformance
    Lemmy Server Performance phiresky 1 year ago 100%
    High CPU usage? How to profile Lemmy server process CPU usage

    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: ![](https://lemmy.world/pictrs/image/5a14c1b7-9bd3-4d20-922c-0f20f3be6459.png) Post your result here. There might be something obvious causing high usage.

    6
    2
    lemmyperformance Lemmy Server Performance Lemmy PostgreSQL performance: comment_like & post_like tables have a lot of indexes (5 alone on comment_like), SQL INSERT is ~~taking 0.4 seconds per upvote.~~ Federation incoming lower priority?
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 100%

    yes, real stats would be real helpful. what about those user queries you said take 10 seconds? is that still true? maybe you could publish a new overview over what you find?

    2
  • lemmyperformance Lemmy Server Performance Lemmy server admins, please enable pg_stat_statements on your PostgreSQL server so the Lemmy community can better identify the performance problems on the more active sites
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 100%

    @roundsparrow@lemmy.ml If you find queries that are slow could you post the EXPLAIN ANALYZE here or send them to me? You can do it manually or maybe use https://www.postgresql.org/docs/current/auto-explain.html

    1
  • lemmyperformance Lemmy Server Performance Lemmy PostgreSQL performance: comment_like & post_like tables have a lot of indexes (5 alone on comment_like), SQL INSERT is ~~taking 0.4 seconds per upvote.~~ Federation incoming lower priority?
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 100%

    well tuned a single insert should take less than a tenth of a millisecond on postgresql. if you're seeing slow times it might be due to very different things, especially the huge locking hot_rank updates that make all inserts / updates on comments,posts table pause until done (which will show up as slower times in the query times you're looking at)

    1
  • lemmyperformance Lemmy Server Performance Lemmy PostgreSQL performance: comment_like & post_like tables have a lot of indexes (5 alone on comment_like), SQL INSERT is ~~taking 0.4 seconds per upvote.~~ Federation incoming lower priority?
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 100%

    it is already in a different repo, just running from the same process. since 0.18 (with debug mode off) it should also be running in a somewhat efficient multi-thread environment

    1
  • lemmyperformance Lemmy Server Performance Lemmy Benchmarking - Working on tooling
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 100%

    Hey! I'm working on a rust tool right now to import a month of reddit dump into a lemmy instance using the federation api (for benchmarking / load testing as well).

    2
  • lemmyworld Lemmy.World Announcements Workaround for the performance issue with posting in large communities
    Jump
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearPH
    phiresky
    1 year ago 87%

    In general websockets scale badly because the server has to keep open a connection and a fair amount of state. You also can't really cache websocket messages like you can normal HTTP responses. Not sure which reasons apply to Lemmy though.

    6