this post was submitted on 19 Jun 2023
21 points (95.7% liked)
Lemmy Server Performance
420 readers
1 users here now
Lemmy Server Performance
lemmy_server uses the Diesel ORM that automatically generates SQL statements. There are serious performance problems in June and July 2023 preventing Lemmy from scaling. Topics include caching, PostgreSQL extensions for troubleshooting, Client/Server Code/SQL Data/server operator apps/sever operator API (performance and storage monitoring), etc.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This query is asking the database to slice into a string in ORDER BY and in WHERE criteria:
the
nlevel
on comment.path field <= and the ORDER BYsubpath
on the same field are really dragging down this query.I am still trying to figure out the circumstances on the lemmy-ui webapp where this particular 13 parameter query is triggered. A GitHub grep of the source code shows 'subpath' is only used in a single place.
There seems a variation of this query that takes 14 parameters instead of 13: