[–] 4 points 1 month ago

Main reason is that all mass media has been bought up by the billionaire class.

These giga-rich assholes would rather support the far right than anything remotely left leaning because they'll do anything to continue paying no tax, as they were essentially doing under Macron.

When I was a kid, the Lepen were frowned upon and considered racist nuts by the media. Now they're everywhere and totally normalized.

  • source
  • parent
  • context
  • Lemmy data pruning (social.ggbox.fr)
     

    I host a lemmy instance for just my account. I don't host any active community or anything, but after 4 years my docker volumes grew to 155GB in total size so I tried to do some cleaning as I don't care that old content is not viewable anymore and I have limited storage (and no object storate for now).

    I wanted to retain only the last year of content, but it turned out to be kind of difficult to achieve.

    First of all, I didn't find any documentation that explains how this should be done so I did a full database and pictrs backup, stopped lemmy (but started PostgreSQL back up), and did some digging myself, with pretty much no prior knowledge whatsoever of how lemmy works internally, but some postgres experience.

    Database

    Database size was 35GB.

    Reviewing the database schema, I found that purging content should be pretty straightforward. Deleting old posts should be enough because the post table has a trigger that handles deleting associated comments.

    Set retention to 1 year :

    retention=365
    

    Remove posts older than ${retention} :

    docker compose exec -it postgres psql -U lemmy -d lemmy -c "DELETE FROM post WHERE published < NOW() - INTERVAL '${retention} days';"
    

    This started computing, but failed after a while because a LIMIT statement within some trigger function ends up having an illegal negative value, probably a bug as far as I can tell. So I revised the above command in order to perform the DELETE by one day steps from 1500 days old onward, in an effort to locate where things start to fail.

    for ((age=1500; age>=${retention}; age-=1)); do
        echo "Older than ${age} days:"
        docker compose exec -it postgres psql -U lemmy -d lemmy -c "DELETE FROM post WHERE published < NOW() - INTERVAL '${age} days';"
    done
    

    Doing this, I could pinpoint the age of the culprit post because the DELETE statement started failing at "older than 949 days".

    For those posts from this particular time interval, I disabled the triggers and performed the cleanup manually on the post and comment tables form psql.

    • Open a psql prompt on the container :
    docker compose exec -it postgres psql -U lemmy -d lemmy
    
    • Disable the triggers on tables
    ALTER TABLE comment DISABLE TRIGGER USER;
    ALTER TABLE post DISABLE TRIGGER USER;
    
    • Delete comments of posts older than 949 days :
    DELETE FROM comment 
    WHERE post_id IN (
        SELECT id FROM post WHERE published < NOW() - INTERVAL '949 days';
    );
    
    • Delete posts older than 949 days :
    DELETE FROM post 
    WHERE published < NOW() - INTERVAL '949 days';
    
    • Re-enable the triggers :
    ALTER TABLE comment ENABLE TRIGGER USER;
    ALTER TABLE post ENABLE TRIGGER USER;
    

    Running the previous stepped DELETE again, it proceeded to purge the rest of the data without issue, although it took hours to complete on my modest VPS.

    This purge deleted lots of rows, but to reclaim the space on filesystem (and rebuild the tables and indices fresh, which doesn't hurt), I ran a VACUUM FULL on the database :

    VACUUM FULL;
    

    Database size is now 8GB. That's 27GB reclaimed!

    Pict-rs

    This volume was taking 120GB. While I do know my way around PostgreSQL, Pict-rs is totally foreign to me. I figured I could try to purge files older than a year old based on find's -mtime, not entirely sure if that would wreck the Pict-rs database or not, but having my volumes safely backed up, I tried it anyways :

    • Set retention to 1 year :
    retention=365
    
    • Delete images older than the set retention :
    find ./volumes/pictrs/files -type f -mtime +${retention} -delete
    
    • Clean up empty directories left behind :
    find ./volumes/pictrs/files -type d -empty -delete
    

    This took forever but it cleared up a lot of space, as the pict-rs volume is now 12GB. That's 108 GB reclaimed!

    I started lemmy to check things out, and while there are a few missing images here and there, all content from the last year is fine. My profile picture was gone, but I just uploaded another one.

    For purging pict-rs, I realize that this method is kind of dumb but I didn't know what better to do. I would have liked to remove only images from posts and comment I had just purged from the database, so that things like profile pictures, community thumbnails, profile banners and such are left untouched, but I don't know how that could be done.

    I'm relatively happy with the purge, and I won't restore from backup. But I can't help but feel this whole thing I did was pretty janky. Why is it such a massive pain to do housekeeping on lemmy? Are we expected to store everything until the end of time?

    [–] 3 points 1 month ago

    I agree discoverability is not good, but after gathering subscriptions for a while, I do have a decently active timeline. As for the account, yes it is useful to have one on some instance, especially because of the remote subscribe feature that I found is a reliable way to subscribe to a remote channel. I used to have an account on a public instance which at the time allowed to register an account. Now I host my own.

    Things that I found helpful to discover content :

    • Follow the #peertube and #livestream hashtags on Mastodon. People tend to advertise their peertube content there.

    • Use the peertubify browser extensions so than any video you watch on YouTube that is also available on peertube gets redirected. I was surprised to find some extra channels this way

    • Search for specific content using Sepia https://sepiasearch.org/

  • source
  • parent
  • context
  • [–] 5 points 2 months ago (6 children)

    I enabled this repo last week on Debian 13 (RTX4080). While it technically works, I'd say it's not without risks for those not a little familiar with linux.

    It first required some fiddling cause the file that is supposed to blacklist Nouveau on boot was renamed by apt as .save or something as a result of the package upgrades, so the system just started loading Nouveau instead of the new driver. Fixing this got me further, as the 610 proprietary driver finally loaded.

    Sarting my usual plasma X11 session didn't work though. It launched but didn't display shit (grey boxes instead of windows and taskbar basically).

    Having also plasma wayland available from sddm, I tried to launch this session and it got me a working desktop. So I ended settling with this. Wayland used to be crap on my system, but with this recent NVIDIA drivers, it's usable. My only real complaint is the extra latency on the mouse cursor.

  • source
  • parent
  • context
  •  

    This is a followup of my previous post where I struggled to use wayland on 22.04 with nvidia.

    After a few more reading and tinkering, I found out that I needed to actively install the more recent nvidia-driver version 570 to have better wayland support, so that's what I did. It was kind of janky as my screen just went black as I apt installed the driver, I had to reset the computer. The next boot, I was running no nvidia driver at all, so I re-did the apt install and it actually completed this time. After a second reboot, I was now running nvidia driver version 570.153.02, yay!

    With that out of the way, I proceeded to test those wayland sessions again, starting with KDE Plasma, but I found it is completely broken for me. Most mouse clicks don't even register, and there is a several seconds lag on everything, it's very weird and unusable.

    Now for gnome wayland. Well, to my surprise, this works about OK. The desktop is relatively smooth at 144hz. I can't help but feel some extra latency on the mouse cursor but it's still usable. So much so that I actually have been trying it out for a few days now, with mixed results I'm afraid.

    While it does work for the most part, it's still not as good an experience as X11 for me, for a few reasons that I found out with daily use :

    • I use mumble extensively, and keyboard shortcuts don't work on wayland (https://github.com/mumble-voip/mumble/issues/5257). I had to set a global gnome shortcut that sends rcp commands to mumble to mute/unmute which was kind of a pain to figure out. I've also lost the "push-to-mute" feature in the process, which is my prefered way to operate the muting/unmuting.
    • I like RustDesk for remote desktop, but it doesn't work well on wayland yet either. (it says it has experimental support, but I just get no image at all so it's just broken for me)
    • The extra latency is not a lot but I do notice it. I've played some Rocket League, it's decent, but not as snappy as on x11.
    • I've had a complete freeze of the desktop yesterday out of the blue, I've had to ssh in to loginctl session-kill my gnome session. This kind of thing never happens on X11, and I can't have that happen too often during work.

    For these reasons, I'm back on x11 for now, but it was fun experimenting. I'll give wayland another go later, with better application support I'm hoping.

    view more: next ›