Hey lemmings!

I wanted to share a quick update about our recent performance issues and how I have addressed them.

The last 24h have been a bit rough for lemm.ee.

Last night, I spent some time debugging federation issues with lemmy.world. We managed to significantly improve the situation - lemmy.world content is now reaching lemm.ee with a very high success rate - but this has had the effect of increasing incoming federation traffic on our servers significantly.

Additionally, we have been seeing steadily increasing normal user traffic over the past week, which is awesome from a community standpoint, but of course means that our servers have to do more work to keep up with all the new people.

To top things off, today there appeared a badly configured instance in the network, which was effectively launching a DoS attack against lemm.ee for several hours. Most likely it was unintentional, but unfortunately the end result was a sudden increase in our server load.

All these factors combined resulted in a really bad experience for most lemm.ee users today. Page load times have consistently been spiking into as much as 10 seconds or more for the whole day:

In fact, a lot of page loads just timed out with errors.

Fortunately, it seems I have managed to clear up the problems!

I have put a bunch of mitigations in place, and after monitoring the situation for the past hour, it seems that our performance issues have been resolved for now. So hopefully, you can enjoy browsing lemm.ee again without it feeling like torture!

Here are specific steps I took:

  • I have doubled the hardware resources for our backend servers and database.
  • I purchased a Cloudflare pro subscription for lemm.ee for 1 year. This took out a considerable chunk of my budget for lemm.ee, but in return it will allow me to analyze and optimize our cache usage to a far greater extent. I am already seeing vastly reduced load times for cacheable content (try opening https://lemm.ee a few times in a row as a logged out user - it should be blazing fast now!)
  • I have configured a rate limiter which will prevent future DoS from the specific method that was used against us today.

Of course, all of the above is costly. Luckily, lemm.ee users have been very generous with donations in the month of June, and in fact a significant amount of donors have opted for monthly recurring contributions. This all gives me the confidence to increase our spending for now, and I am currently expecting to NOT increase my personal planned contribution of 150€/month, as the increased costs so far are entirely being covered by donations!

Let me take this opportunity to thank the sponsors who made the upgrades possible! All lemm.ee users are now enjoying better performance thanks to you, I could not have done it without you awesome people.

On a final note, I just want to say that I hope a lot of these issues can be solved by optimizations in Lemmy software itself in the future. I have been personally contributing several optimizations to the Lemmy codebase, and I know many others are focused on optimizations as well. Just throwing extra resources at the problem will probably not be a sustainable solution for very long 😅. But I am optimistic that we are moving in the right direction with the software changes, and we’ll be enjoying reduced resource needs before long.

That’s all I wanted to share today, I wish you all a great weekend!

  • Quinten
    link
    fedilink
    English
    112 years ago

    I just fucking love the transparency of the admins of lemmy.world and lemm.ee. Cheers guys!

  • AstralWeekends
    link
    fedilink
    English
    42 years ago

    I hope years from now you get to look back on these times as the beginning of something great not only for you, but also for the future of social media on the internet. Your dedication to this project has been admirable, and you are absolutely crushing it.

  • Beaupedia
    link
    fedilink
    English
    82 years ago

    I’m brand new, this is my first comment. Thanks for your work! Where can we donate to this instance?

  • WndyLady
    link
    fedilink
    English
    22 years ago

    I’m so grateful for your knowledge and persistence. My donation finally went through after fighting with my bank. Maybe I don’t have to give up my Gen X card afterall.

  • @[email protected]
    link
    fedilink
    English
    32 years ago

    You are awesome man. I wanted to wait until the instance matured before committing to a monthly donation but I am signing up now. You’re the best instance admin anyone can hope for. Glad to see your patch make it to 0.18

  • @[email protected]
    link
    fedilink
    English
    3
    edit-2
    2 years ago

    On a side note, really liking this 0.18.1 release candidate version, the 0.18.1 official release is going to be brilliant. The new compact view is beautiful and it scales with window width nicely. They just need to drop the post header size a bit and the compact view will be perfect. This release candidate seems to be pretty solid, only seeing fixes, no new bugs.

  • @[email protected]
    link
    fedilink
    English
    12 years ago

    Wanted to share something from my experience running a pleroma instance: I was having an issue where postgresql was becoming more and more of my CPU utilization. It looked like I was going to have to buy a seriously upgraded server, my loads like 3-4 constantly.

    I ran pg_repack during a lower traffic hour (site continued to run during the run but at reduced performance) and my loads were down by 90%, to much less than 1. Now I have it set to do a repack weekly (ymmv, it just seemed like a good frequency to me)

    Haven’t done it to my Lemmy server yet, but that’s because of all my instances this one is the newest.

  • @[email protected]
    link
    fedilink
    English
    22 years ago

    Yeah the slowdown was a bit rough, been browsing off and on all day today. Thanks for fixing that. Seems to be working a lot better now. That’s a bummer you had to increase expenses though.

  • AndromedusGalacticus
    link
    fedilink
    English
    22 years ago

    This is so awesome! Thank you for everything you’ve done. You continue to prove my belief that this is the best instance to be on.

  • @[email protected]
    link
    fedilink
    English
    2
    edit-2
    2 years ago

    Not sure if this is related to the infra upgrade, but my earlier issue with not seeing all the posts in the meta community is now fixed.

    • @[email protected]OP
      link
      fedilink
      English
      32 years ago

      Awesome news! I did make a small fix to a localization bug in Lemmy-ui, which was causing some people to not see posts, so it could have been that. But in any case, I’m glad it’s sorted for you!

  • Alice
    link
    fedilink
    English
    12 years ago

    I wanna see you bounce that ass like a basketball 🏀

  • @[email protected]
    link
    fedilink
    English
    22 years ago

    How much of the slowdown was caused by the bad instance VS the limitations of the previous hardware?

    • @[email protected]OP
      link
      fedilink
      English
      42 years ago

      The DoS was responsible for about 10-20% increased load on our system - it wasn’t the root cause of the slowdowns, it was more like a nice cherry on top of the cake 😅 The bigger issue is the constantly increasing federation load.

  • @[email protected]
    link
    fedilink
    English
    22 years ago

    Definitely appreciate the improved speed, but the persistent federation issues has left me in a permanent FOMO state.

    • @[email protected]OP
      link
      fedilink
      English
      2
      edit-2
      2 years ago

      I know what you mean! The good news is that there are some huge improvements for federation in 0.18.1. These improvements depend on instances at both ends being on 0.18.1, so we’ll start seeing it kick in shortly as more of the network upgrades.

      • @[email protected]
        link
        fedilink
        English
        22 years ago

        Is there a way to manually trigger a sync or so?

        Seeing other reply to you on another instance, and not being able to respond because those replies aren’t on lemm.ee is very frustrating.

          • @[email protected]
            link
            fedilink
            English
            1
            edit-2
            2 years ago

            Thanks! This seems to work for top-level comments, but not nested comments. Might be a known big but thought I’d mention it :-).