I wanted to post this question in a neutral community and not the specific Lemmy or Piefed ones.
I am curious to learn how resource utilization is comparing in the real world operation of Piefed vs. Lemmy instances, given a similar level of users and user activity? Considering that Piefed is written in Python and Lemmy is written in Rust, I would think that the difference would be significant, but I recall someone mentioning in the past that the main resource constraint for both these platforms would be database-related instead so the language choice wouldn’t have much impact. I’m curious if this is proving correct in the real world as opposed to in theory.
I know that there are a few admins out there who are running both and I would love to hear their thoughts on this.
I run a personal lemmy instance and two personal piefed instances, so I was just doing some comparisons. My instances are mainly used for development and testing, so they are only subscribed to a handful of communities and just have one active user.
You are correct that when it comes to performance, like snappiness and responsiveness, the database is probably going to be the bottleneck. Unless you are scaling up to a huge degree, I would be surprised to see meaningful differences in the number of requests that could be handled due to language differences between rust and python. Yes, python is an interpreted language, but most of the libraries you are using are basically calling other system libraries written in a language like C, and the program can execute way faster than your database I/O can give it data to process anyway.
Here is my usage summary. The lemmy instance has been running for about 1.5 years while the piefed instance has been running for just shy of a year now. I have only included the memory usage and disk since I don’t think either is really CPU hungry or bound in my use case.
Software Memory consumption Disk Usage Lemmy ~1.5 GB ~800 MB Piefed ~1 GB ~200 MB Thank you very much for your detailed reply! It’s interesting that they’re pretty similar. I had thought about that possibility of performance-critical Python libraries being being written in a system language. I appreciate it.
Choice of programming language rarely makes any noticeable difference in web services
Do you mean at smaller scales? I’ve read many articles in the past that say that some languages for web application servers perform better / require less resources for the same performance than others but maybe it makes more difference at larger scales.
Here’s my Lemmy
docker statsfor lemmy.mods4ever.comCONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 84102db7f1d2 lemmy_proxy_1 0.00% 9.27MiB / 7.566GiB 0.12% 6.68GB / 2.9GB 188kB / 463kB 5 4e6a8c728e47 lemmy_lemmy-ui_1 0.00% 335.3MiB / 7.566GiB 4.33% 1.94GB / 5.46GB 10.1MB / 0B 11 dc58b8518b9d lemmy_lemmy_1 0.06% 265.4MiB / 7.566GiB 3.43% 16GB / 6.13GB 5.46MB / 0B 10 0e08ceb5f404 lemmy_pictrs_1 0.14% 52.73MiB / 690MiB 7.64% 12.1MB / 555MB 48.5MB / 2.88GB 20 c275f58231d4 lemmy_postgres_1 0.00% 574.9MiB / 1000MiB 57.49% 3.23GB / 14.8GB 30.2MB / 4.46GB 37 1f3ac56b2a06 lemmy_postfix_1 0.00% 5.168MiB / 7.566GiB 0.07% 173kB / 126B 926kB / 77.8kB 7Thanks. Do you know for how many concurrent users or any other measure of user demand?
I don’t have open signups on there, it’s just for hosting communities
No problem, thanks anyway for posting your info!
I can’t find/remember the post but recently an admin shared some resource usage graphs. The thing that jumped out at me was their Lemmy instance was using 32 GB of ram while their PieFed instance was using 2 GB of ram. Maybe a little more, but it was low single digits.
Maybe their piefed graph did not include postgresql, which should be 2 GB just by itself… That would bring the total up to around 4 or 5 GB. piefed.social uses between 4 and 5 GB, too.
CPU usage was quite similar between the two.
@dessalines@lemmy.ml why so heavy on resource?
Thanks. Wouldn’t that depend a lot on user demand at the time this was measured? If the Lemmy instance was handling 20x as many users at that time it might explain much larger RAM usage, for example.
This is why I was hoping to be able to compare for similar levels of users. If Lemmy requires 32 GB for 200 users and Piefed requires 2 GB for 10 users, it could still be that Lemmy was more efficient.
Yes, it’s tricky. I don’t remember which instance it was but it was one of the smaller lemmy instances with roughly the same MAU as Piefed.social, tho. Not any of the top 6 Lemmy instances.
It could have been an outlier. Looks like lemmy.mods4ever.com is much more reasonable although that’s a single-user instance so it’s going to be the absolute minimum.
Got it, thanks!
That’s not even near reasonable, maybe lemmy.world lol
Here since 2023 with lemmy.eco.br and never had anything near that.
Of course there used to be problems on older versions (both Lemmy and Postgres had more bugs back then)
What if we correct that for per member, on median?
It might not be a linear relationship, but could be a decent approximation if we had multiple data points





