this post was submitted on 28 Jul 2023
183 points (98.9% liked)

Announcements

23315 readers
1 users here now

Official announcements from the Lemmy project. Subscribe to this community or add it to your RSS reader in order to be notified about new releases and important updates.

You can also find major news on join-lemmy.org

founded 5 years ago
MODERATORS
 

What is Lemmy?

Lemmy is a self-hosted social link aggregation and discussion platform. It is completely free and open, and not controlled by any company. This means that there is no advertising, tracking, or secret algorithms. Content is organized into communities, so it is easy to subscribe to topics that you are interested in, and ignore others. Voting is used to bring the most interesting items to the top.

Major Changes

This version brings major optimizations to the database queries, which significantly reduces CPU usage. There is also a change to the way federation activities are stored, which reduces database size by around 80%. Special thanks to @phiresky for their work on DB optimizations.

The federation code now includes a check for dead instances which is used when sending activities. This helps to reduce the amount of outgoing POST requests, and also reduce server load.

In terms of security, Lemmy now performs HTML sanitization on all messages which are submitted through the API or received via federation. Together with the tightened content-security-policy from 0.18.2, cross-site scripting attacks are now much more difficult.

Other than that, there are numerous bug fixes and minor enhancements.

Support development

@dessalines and @nutomic are working full-time on Lemmy to integrate community contributions, fix bugs, optimize performance and much more. This work is funded exclusively through donations.

If you like using Lemmy, and want to make sure that we will always be available to work full time building it, consider donating to support its development. No one likes recurring donations, but they’ve proven to be the only way that open-source software like Lemmy can stay independent and alive.

Upgrade instructions

Follow the upgrade instructions for ansible or docker. There are no config or API changes with this release.

This upgrade takes ~5 minutes for the database migrations to complete.

You may need to run sudo chown 1000:1000 lemmy.hjson if you have any permissions errors.

If you need help with the upgrade, you can ask in our support forum or on the Matrix Chat.

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 39 points 1 year ago* (last edited 1 year ago) (1 children)

Update on lemmy finances (not including cryptocurrencies)

patreon: $1,591/month

liberapay: $374.22 per week (about 1609 per month)

open collective: $2082 (29/6/2023 -> 29/7/2023)

Assuming 63K active users , the per user monetization of 0.08 dollar per user (Reddit's revenue per monthly user is roughly $1.19).

Estimated developer salary for the two main developers is about 2600$, estimated median salary for developer in the US is about 10K a month.

For comparison firefish made about 1424$ ((29/6/2023 -> 29/7/2023) with an active users count of 11868 (or 8146 if you don't count calckey, which i think is important because they added a pop up asking for donation, but i don't know if that is after the name change) so that gives a per user monetization of 0.11 dollar per user ( or 0.17 not counting calckey).

Corrections are welcomed.

[–] [email protected] 4 points 1 year ago

Thanks for the insight!

[–] [email protected] 28 points 1 year ago

80% reduction is crazy! Good job!

[–] [email protected] 22 points 1 year ago (1 children)

80% is wizard like, great work, thanks [email protected]!

[–] [email protected] 40 points 1 year ago (2 children)

That particular improvement is actually mine. Lemmy was storing a lot of federation data which was completely unused so I removed it. However the 80% improvement is actually overstated, because not all data was migrated to the new table. So the db will grow a bit bigger over time, but still much smaller than before.

Phiresky made a lot of other sql optimizations which make Lemmy snappier and reduce CPU usage on the server. We don't have any benchmarks in that regard, but server load on lemmy.ml has gone down a lot since upgrading.

[–] [email protected] 8 points 1 year ago

Thanks for the clarification! Your stewardship along with everyone collaborating in work and donations makes for a wonderful project. Really demonstrates the power of people working together to provide spaces outside of the control of corporate interests that are destroying other platforms.

[–] [email protected] 2 points 1 year ago

Do we need to run a full vacuum after upgrade? And for that matter, is the data not used truncated during upgrade?

[–] [email protected] 15 points 1 year ago (1 children)

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

[–] [email protected] 7 points 1 year ago

Thank you all for your work!

[–] [email protected] 13 points 1 year ago (1 children)
[–] [email protected] 12 points 1 year ago (2 children)

It was actually easy because a lot of data was stored which was never used at all.

[–] [email protected] 12 points 1 year ago

Shhh let me compliment youuuu

[–] [email protected] 8 points 1 year ago (1 children)

I was saving that data, you never know when it might come in handy.

load more comments (1 replies)
[–] [email protected] 12 points 1 year ago (1 children)

🙏 Thank you Devs.

Kind People, please donate .

[–] [email protected] 6 points 1 year ago

As a donor I had to spend some amount of time finding where to donate, that could be more explicit

[–] [email protected] 8 points 1 year ago* (last edited 1 year ago) (2 children)

well my Lemmy backups did exceed 10MB, but the 0.18.3 database optimizations brought me under 10MB again lol

11M Jul 28 22:35 bak-lemmy-2023-07-28_22.35.52.zip
8.8M Jul 28 22:39 bak-lemmy-2023-07-28_22.38.59.zip

(hosting an instance with communities but no users doesn't need much hardware at all btw)

[–] [email protected] 6 points 1 year ago (1 children)

Willing to share any numbers? How many communities and how many resources?

[–] [email protected] 7 points 1 year ago* (last edited 1 year ago)

there's not a lot on there

https://lemmy.mods4ever.com/communities

10 communities, few hundreds of subs, maybe like 30 posts

unzipped storage usage:

# du -h --max-depth=2 . | sort -h
8.0K    ./volumes/lemmy-ui
9.5M    ./volumes/pictrs
76M     ./volumes/postgres
85M     .
85M     ./volumes
[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)
1,4G jul 29 19:15 lemmy_dump_2023-07-29_19_01_51.sql.gz
262M jul 30 12:58 lemmy_dump_2023-07-30_12_56_35.sql.gz
[–] [email protected] 7 points 1 year ago (1 children)

I wish clicking this link would actually show the context instead of just refreshing the page.

load more comments (1 replies)
[–] [email protected] 7 points 1 year ago (1 children)

Hi there! Looks like you linked to a Lemmy community using a URL instead of its name, which doesn't work well for people on different instances. Try fixing it like this: [email protected]

[–] [email protected] 7 points 1 year ago (1 children)

I think they know what they're doing, bot

[–] [email protected] 6 points 1 year ago

It's just that the text is copied directly from join-lemmy.org, which requires actual links.

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago)

and again, docker images for arm64 are ready as well :)

[–] [email protected] 6 points 1 year ago (1 children)

Please make Lemmy easily crawable by search engines so people can get useful search results

[–] [email protected] 9 points 1 year ago

It is, the problem is search engines aren't designed to deal with federation. Ty search-lemmy.com for one that is

[–] [email protected] 4 points 1 year ago

Sunday, lemmy.ml is performing better than I have seen it in 60 days. I did get errors on Saturday and significant lag. Not sure if activity is just today or what, but it's really been fast in routine browsing.

[–] [email protected] 4 points 1 year ago

you're all amazing! thank you and keep up the good work!

[–] [email protected] 4 points 1 year ago

Neat!

If you can, please keep supporting the devs with some resources.

[–] [email protected] 3 points 1 year ago (3 children)

docker compose down && docker compose pull && docker compose up -d update was flawless. nice!

load more comments (3 replies)
[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (2 children)

Heads-up that a new issue on GitHub reporting this problem upgrading from 0.18.2 to 0.18.3:

thread 'main' panicked at 'Couldn't run DB Migrations: Failed to run 2023-07-08-101154_fix_soft_delete_aggregates with: syntax error at or near "trigger"', crates/db_schema/src/utils.rs:221:25 note: run with 'RUST_BACKTRACE=1' environment variable to display a backtrace

https://github.com/LemmyNet/lemmy/issues/3756

If you use "Lemmy from scratch" install,

you may be on an older PostgreSQL that Ubuntu distro provides, not the same as the Docker install method.

load more comments (2 replies)
[–] [email protected] 2 points 1 year ago (1 children)

Heads-up for anyone who compiles the Rust code from source and is testing/integrating their own manual changes/patches to the code... the main git branch is not what Lemmy 0.18.3 is based on. https://github.com/LemmyNet/lemmy/issues/3602

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

For rust app developers, the publishing of lemmy_api_common crate is also discontinued with this release: https://github.com/LemmyNet/lemmy/commit/5cd4c6c5868c8bec964b6065d079f3a057885be7

For LASIM I switched to point at the Git Repo + Specific Tag in my Cargo.toml.

[–] [email protected] 2 points 1 year ago (1 children)

I think Lemmy is cool if search engines crawls the contents easily so people can get useful answers

[–] [email protected] 4 points 1 year ago (1 children)

Can't we already use https://search-lemmy.com/? I actually found some answers so my questions today thanks to it

[–] [email protected] 3 points 1 year ago

That’s awesome. I was wondering just today that lemmy may have already accumulated enough content to provide hits for a number of searches.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (2 children)

Ran into this issue with database migrations:

Failed to run 2023-07-08-101154_fix_soft_delete_aggregates with: syntax error at or near "trigger"', crates/db_schema/src/utils.rs:221:25

Will open an issue on GitHub.

[–] [email protected] 4 points 1 year ago (1 children)

That has to do with you running a custom install with an older postgres that lemmy doesn't support.

load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 2 points 1 year ago

Super straightforward upgrade via docker compose, thanks for all the hard work ❤️

[–] [email protected] 2 points 1 year ago

Upgraded! No issues.

Again, thank you for your amazing work!! :D

[–] [email protected] 2 points 1 year ago

Thank you for all of your hard work devs! I'm a supporter with monthly payments.

[–] [email protected] 2 points 1 year ago

Thank you for your and the contributors' work!

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

Upgraded without issue (other than manually restarting docker after upgrading)! Thanks!

I did it with Lemmy-Easy-Deploy by simply running sudo ./deploy.sh -y

load more comments (1 replies)
[–] [email protected] 2 points 1 year ago

80% is a massive improvement! Nice work!

[–] [email protected] 2 points 1 year ago

And... upgraded. Thanks!

load more comments
view more: next ›