GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Aral Balkan (aral@mastodon.ar.al)'s status on Thursday, 20-Jul-2023 19:01:27 JST Aral Balkan Aral Balkan
    • Jan

    The latest Mastodon single-person instance performance/scaling issue:

    350+ queries to the database each taking over 2 seconds each basically every time I post something. 👀

    Very odd.

    (In case you wonder why you can’t reach my instance after I post sometimes.)

    The lovely @jan is on it and opened an issue (https://github.com/mastodon/mastodon/issues/25949) but there doesn’t seem to be much progress yet.

    Looks like my account is a good canary in the coalmine for this stuff :)

    #mastodon #scaling #performance

    In conversation Thursday, 20-Jul-2023 19:01:27 JST from mastodon.ar.al permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
      Hundreds of slow queries after posting to 40k followers · Issue #25949 · mastodon/mastodon
      Steps to reproduce the problem Publish a post to 40k followers on a 6 year old instance. Expected behaviour Sidekiq should process the publishing jobs in background. Actual behaviour UI freezes for...
    • Embed this notice
      Aral Balkan (aral@mastodon.ar.al)'s status on Thursday, 20-Jul-2023 19:08:40 JST Aral Balkan Aral Balkan
      in reply to
      • 𝗣𝗠𝗝 👽

      @pmj Yeah, I used to experience that a lot when I was on a lower-powered server:

      https://ar.al/2022/11/09/is-the-fediverse-about-to-get-fryed-or-why-every-toot-is-also-a-potential-denial-of-service-attack/

      In conversation Thursday, 20-Jul-2023 19:08:40 JST permalink
    • Embed this notice
      𝗣𝗠𝗝 👽 (pmj@social.pmj.rocks)'s status on Thursday, 20-Jul-2023 19:08:42 JST 𝗣𝗠𝗝 👽 𝗣𝗠𝗝 👽
      in reply to

      @aral

      during the november 22 wave of twitter refugees someone made a calculation concerning big accounts (25k+ followers) and concluded that each one of them could singlehandedly take down an instance due to the server having to distribute the content to so many users - and then the followers react

      In conversation Thursday, 20-Jul-2023 19:08:42 JST permalink
    • Embed this notice
      Aral Balkan (aral@mastodon.ar.al)'s status on Thursday, 20-Jul-2023 19:29:38 JST Aral Balkan Aral Balkan
      in reply to
      • 𝗣𝗠𝗝 👽

      @pmj Haha, no worries :)

      In conversation Thursday, 20-Jul-2023 19:29:38 JST permalink
    • Embed this notice
      𝗣𝗠𝗝 👽 (pmj@social.pmj.rocks)'s status on Thursday, 20-Jul-2023 19:29:39 JST 𝗣𝗠𝗝 👽 𝗣𝗠𝗝 👽
      in reply to

      @aral

      lol, dammit! that was the "someone" i was refering to 😅
      couldn't remember 🙈

      In conversation Thursday, 20-Jul-2023 19:29:39 JST permalink
    • Embed this notice
      Jeroen Baert (jbaert@mastodon.social)'s status on Thursday, 20-Jul-2023 22:28:07 JST Jeroen Baert Jeroen Baert
      in reply to
      • Jan

      @aral @jan Thank you for being the canary :) There are some serious worries about how populair single-user instances will scale.

      In conversation Thursday, 20-Jul-2023 22:28:07 JST permalink
    • Embed this notice
      Aral Balkan (aral@mastodon.ar.al)'s status on Thursday, 20-Jul-2023 22:28:07 JST Aral Balkan Aral Balkan
      in reply to
      • Jeroen Baert
      • Jan

      @jbaert @jan *chirp, chirp* :)

      In conversation Thursday, 20-Jul-2023 22:28:07 JST permalink
    • Embed this notice
      Aral Balkan (aral@mastodon.ar.al)'s status on Friday, 21-Jul-2023 15:31:26 JST Aral Balkan Aral Balkan
      in reply to
      • Jan
      • Gytis Repečka

      @gytis @jan In their defense, hindsight is always 20/20 and we all learn about what we’re building as we’re building it. It might have made sense at some point (or, at least, wasn’t a hindrance). What matters is we fix things when they become issues. I’d rather that than premature optimisation. The latter is why things never get shipped and/or why we keep shipping over-complicated things. (All within reason, ofc. Not saying we shouldn’t keep learning or follow good practices whenever we can.)

      In conversation Friday, 21-Jul-2023 15:31:26 JST permalink
    • Embed this notice
      Gytis Repečka (gytis@fedi.lt)'s status on Friday, 21-Jul-2023 15:31:28 JST Gytis Repečka Gytis Repečka
      in reply to
      • Jan

      @aral @jan It is insanely bad query programming to have 3.5k IDs in WHERE clause 🤯 Considering table is properly indexed and vacuumed, I would split them into 100-200 microbatches and if each involves pinging a separate server of a follower account, even make those batches smaller. LIMIT and OFFSET should be the start from database side and then some task queueing from backend 🧐 #postgresql #sql #performance :postgresql:

      In conversation Friday, 21-Jul-2023 15:31:28 JST permalink
    • Embed this notice
      Aral Balkan (aral@mastodon.ar.al)'s status on Friday, 21-Jul-2023 16:14:38 JST Aral Balkan Aral Balkan
      in reply to
      • Jan
      • Gytis Repečka

      @gytis @jan Yep and that gets it out the door. Then the database experts can optimise the query when, seven years down the line, it becomes a performance problem for someone who is an edge case for the particular design ;)

      In conversation Friday, 21-Jul-2023 16:14:38 JST permalink
    • Embed this notice
      Gytis Repečka (gytis@fedi.lt)'s status on Friday, 21-Jul-2023 16:14:39 JST Gytis Repečka Gytis Repečka
      in reply to
      • Jan

      @aral @jan Yet it is often problem when developers use database just to persist data without proper guidance from database experts. Maybe it's not the case with Mastodon (although mentioned query suggests), but I've seen far too many projects where devs just do "dump all" and "select all" with terribly narrow understanding of "if it does not perform - just add another index" 🤓

      In conversation Friday, 21-Jul-2023 16:14:39 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.