Open-source News

How to switch from Twitter to Mastodon

opensource.com - Fri, 11/11/2022 - 16:00
How to switch from Twitter to Mastodon Jessica Cherry Fri, 11/11/2022 - 03:00

Like many people, I find social media somewhat exciting and also...a bit much. Sometimes you get deep-fried in algorithms, tracking data, and ads catered especially for you. You lack administrative control over what you want to see, especially on the old platforms many of us are used to. As usual, you must look to open source to fix the problem. And that's exactly what Mastodon, an open source microblogging community, does.

With Mastodon social, not only are you working with open source software, but everything is decentralized, which means you can pick what you want to see partly based on the instance you want to occupy. Mastodon uses separate instances, each with its own code of conduct, privacy options, and moderation policies. That means that when you join an instance, you're less likely to see the stuff you're not interested in and more likely to see messages from people who share your interests.

However, you can also interact with other instances. All Mastodon installs have the potential to be "federated" in what its users call the "fediverse."

More open source alternatives Open source project management tools Trello alternatives Linux video editors Open source alternatives to Photoshop List of open source alternatives Latest articles about open source alternatives What is the fediverse?

The fediverse is an ensemble of federated (or interconnected) servers. The word comes from the mix of "federated" and "universe." You can use this for all sorts of web publishing, from social networking to websites to file hosting. While each instance is hosted independently, they can talk to each other.

So how can I sign up for Mastodon?

First, go to Mastodon.social to sign up.

On the right-hand side of the screen, there are Sign in and Create account buttons.

Image by:

(Jess Cherry, CC BY-SA 4.0)

However, because anyone can run a Mastodon server, there are many instances, and some servers are already home to a community with interests that may align with your own. As I've said, you'll have access to the whole fediverse no matter what, but it can be nice to start on a server where people already "speak your language" (that can be literal, too, because you can add a filter to find a server in your native language).

To find a server, click the Find another server button.

Image by:

(Jess Cherry, CC BY-SA 4.0)

When you click that button, you're brought to the Join Mastodon page, with a button to list available servers.

Image by:

(Jess Cherry, CC BY-SA 4.0)

As you scroll down, you can pick a topic on the left to help you find where you would like to be hosted.

Image by:

(Jess Cherry, CC BY-SA 4.0)

I'm all about open source, so let's see what we have in the technology topic.

Image by:

(Jess Cherry, CC BY-SA 4.0)

As you can see, there's a large index with many waiting lists. In this case, it looks like Don Watkins, a fellow Opensource.com author, has chosen an instance that works for himself and our talented group. So I'll skip ahead and tell you where I'm going: There's a free open source software server known as Fosstodon, and I've chosen to sign up there so I can share my articles freely.

Here are the sign-in steps.

First, enter your information:

Image by:

(Jess Cherry, CC BY-SA 4.0)

Next, you get a message about a confirmation email:

Image by:

(Jess Cherry, CC BY-SA 4.0)

When you get to your email, click the Verify button, and the system prompts you to confirm your login information.

This server does have an application process to join. This process isn't just for safety reasons but also for privacy. Once approved, you get this amazing email!

Image by:

(Jess Cherry, CC BY-SA 4.0)

I kept my handle from other social media venues, so it's easy to move back and forth from one place to another and cross-post with replication and API calls.

Complete control

Now that I have a new profile, I can change preferences on what emails I receive, allowing for more control over what I see. This is a good way to give me more power over my media intake, and it's greatly appreciated. Once I click Preferences, Mastodon offers me cool appearance, language information, and many other options.

Image by:

(Jess Cherry, CC BY-SA 4.0)

Next, I can click notifications and limit what I see and what I get notified for, so I can opt for less noise.

Image by:

(Jess Cherry, CC BY-SA 4.0)

This complete control of my media without algorithmic intervention is great. You can also set up featured hashtags for what you want on your profile to follow long-term projects or allow people to find you by following those hashtags. You also have the options for filters, followers, and so much more.

Final notes

This open source social media is a great way to find your group of people and broadly interact with those in a broad universe of interests. Controlling media intake is great for some balance in your life, and you can opt-in to contributing by checking the contributor rules.

In addition to the control over your own social media experience, you also gain phone apps that work on all devices, including Toot for iPhone and Tusky for Android.

Long story short: I think we should all get ready for a new open source world of social media.

Mastodon is an open source microblogging community.

Image by:

Opensource.com

Alternatives What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Drop swap for zram on Linux

opensource.com - Fri, 11/11/2022 - 16:00
Drop swap for zram on Linux David Both Fri, 11/11/2022 - 03:00

I spend a lot of time playing (I mean working) on my computers, and I've found a lot of interesting things. One that has most recently come to my attention is the zram0 device. I first noticed it when working on one of my Opensource.com articles several months ago. It showed up in the output from the lsblk command:

# lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda             8:0    0 931.5G  0 disk
├─sda1          8:1    0   600M  0 part
[...]
zram0         252:0    0     8G  0 disk [SWAP]

It's identified as swap space, which is what first piqued my curiosity, so I did some exploration. Zram was originally called "compcache," which stands for "compressed cache." It turns out that zram is a tool for creating an in-RAM compressed cache, specifically for use as swap space.

But Why?

More Linux resources Linux commands cheat sheet Advanced Linux commands cheat sheet Free online course: RHEL technical overview Linux networking cheat sheet SELinux cheat sheet Linux common commands cheat sheet What are Linux containers? Our latest Linux articles

When I began researching zram, all I found were a couple of basic articles about using zram for swap space. At first, this seemed a bit counterintuitive to me. After all, if you're running out of RAM and you swap pages into a virtual drive in RAM, what's gained?

I then found the Fedora Project wiki page that proposed the use of Swap on zram. The proposal says: "Swap is useful, except when it's slow. zram is a RAM drive that uses compression. Create a swap-on-zram during start-up. And no longer use swap partitions by default."

The rest of the page is about details, benefits, side effects, and feedback.

Zram for swap space on Linux

Using zram for swap space is intended to do the same thing as regular partition-based or file-based swap space. When memory pressure becomes too great, some of the least recently used data is moved to swap space. On average, it's compressed to about 50% of its original size, and placed in zram space in RAM. This is much faster than storing those memory pages on a hard drive and frees up the RAM it was using for other use.

Saving on swap

I tried to find revised recommendations for how much swap or zram swap to configure. This led me back to a reassessment of swap, and my previous article, What's the right amount of swap space for a modern Linux system? As far as I can tell from the most current documentation for RHEL and Fedora, the recommended amount of swap space has not changed. That documentation, however, ignores the use of zram.

However, the tables in that previous article still provide a good starting point for swap space allocation when using older releases of Linux that don't use zram or in cases where zram has been disabled.

The documents I found for the Zram feature are inconsistent in terms of how zram is allocated with respect to RAM size, and the amount of space allocated to zram swap.

Due to the lack of authoritative documentation, I performed some experiments to empirically determine the algorithm used to allocate zram swap. I used my own physical and virtual systems for this. The results are interesting and do not match any documentation I've so far found.

The default size of zram is 8 GB on all systems large enough to support that, but it's typically reduced significantly on hosts with small amounts of RAM. On one virtual machine (VM) I use for testing, with access to 4 GB of RAM, the zram virtual swap space is allocated to 3.8 GB. One old Dell I have contains 8 GB of RAM, and the zram is set to 7.6 GB. When RAM is reduced to 2 GB, Zram is reduced to 1.9 GB.

All physical and virtual hosts I have with more than 8 GB of RAM show exactly 8 GB of zram. This includes my primary workstation with 64 GB of RAM and other hosts with 16 GB or 32 GB of RAM.

Based on these few data points, I can draw the conclusion that the current default settings are for 8 GB of zram at most, and for zram to be 95% of RAM on hosts with 8 GB or less.

I have read a number of articles that mention other sizes for zram swap, even up to 100% of RAM, but those all seem to be theoretical rather than reality.

Your distribution may be different, but here are the actual zram swap allocations for Fedora and similar distributions:

  • RAM ⇐ 8 GB: 0.95 × RAM

  • RAM > 8 GB: 8 GB

Be aware that the zram swap size algorithm is not based on any recommendations for the "best" swap size for any given real-world system or application. This zram swap allocation is a rather probabilistic approach to what should work well on a wide range of Linux hosts. However, the fact that the maximum zram swap size is configured for 8 GB and the fact that I have always recommended 8 GB as the maximum amount of traditional swap, I think I can say it's reflective of the optimum sizes for zram swap.

Managing zram swap

Zram defaults are stored in the /usr/lib/systemd/zram-generator.conf configuration file. The following is from one of my test VMs with 5097 GB of RAM allocated.

# cat /usr/lib/systemd/zram-generator.conf
# This config file enables a /dev/zram0 device with the default settings:
# - size - same as available RAM or 8GB, whichever is less
# - compression - most likely lzo-rle
#
# To disable, uninstall zram-generator-defaults or create empty
# /etc/systemd/zram-generator.conf file.
[zram0]
zram-size = min(ram, 8192)

You can change the default Zram swap size in the last line of the zram-generator.conf configuration file. I recommend against doing that, unless you can definitively show a reason for doing so, and test your results once you make any changes. Like many other configuration defaults in Linux, the zram ones have been well-tested and are appropriate for most use cases.

Monitor zram

The zramctl utility can be used to view the current state of zram.

# zramctl
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle       4.8G   4K   80B   12K       4 [SWAP]

The traditional swapon command can also be used to view swap including zram used as swap:

# swapon --show
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition 4.8G   0B  100

One thing to be aware of is that zramctl does not report on zram when it contains no data, so the results contain null output. Tools like lsblk, swapon, top, free, htop, and so on, do show zram even when it contains no data.

Deactivate zram

The swapoff -a command turns off zram swap as well as traditional HDD or SSD storage used as swap. The swapon -a command does not show zram when it is empty. Use zramctl /dev/zram0 instead.

# swapon --show
# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda             8:0    0  120G  0 disk
├─sda1          8:1    0    1G  0 part /boot/efi
├─sda2          8:2    0    1G  0 part /boot
└─sda3          8:3    0  118G  0 part
  ├─vg01-root 253:0    0   10G  0 lvm  /
  ├─vg01-swap 253:1    0    3G  0 lvm  [SWAP]
  ├─vg01-usr  253:1    0   30G  0 lvm  /usr
  ├─vg01-home 253:2    0   10G  0 lvm  /home
  ├─vg01-var  253:3    0   30G  0 lvm  /var
  └─vg01-tmp  253:4    0   10G  0 lvm  /tmp
sr0            11:0    1 1024M  0 rom
zram0         252:0    0    0B  0 disk
# zramctl
#
# zramctl /dev/zram0
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle         0B   0B    0B    0B       4

Note that /dev/zram0 doesn't show up in these commands as swap space until it's being used for that purpose. This caused me some confusion until my experiments showed it to be the case.

Creating Zram Swap

Zram itself has been around for about 20 years, but has only been in use as swap space on some distributions for the last year or two. The current Linux installation on some or all of your hosts may not have been created with zram for swap. If that's the case, it can be easily remedied.

For Fedora 32, the last release prior to the default use of zram for swap, it only takes three easy commands.

First, verify the presence of the zram-swap.service file, installed as part of the zram RPM package.

# systemctl status zram-swap
● zram-swap.service - Enable compressed swap in memory using zram
     Loaded: loaded (/usr/lib/systemd/system/zram-swap.service; disabled; vendor preset: disabled)
     Active: inactive (dead)

Next, install the zram-generator-defaults and zram-generator packages.

# dnf install zram-generator-defaults zram-generator

Enable and start the zram-swap service:

# systemctl enable zram-swap.service
# systemctl start zram-swap.service

And then verify that zram0 exists, and is being used as swap space:

# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda             8:0    0  120G  0 disk
├─sda1          8:1    0    2G  0 part /boot
└─sda2          8:2    0  118G  0 part
  ├─vg01-root 253:0    0   10G  0 lvm  /
  ├─vg01-swap 253:1    0    3G  0 lvm  [SWAP]
  ├─vg01-usr  253:2    0   35G  0 lvm  /usr
  ├─vg01-tmp  253:3    0   15G  0 lvm  /tmp
  ├─vg01-var  253:4    0   35G  0 lvm  /var
  └─vg01-home 253:5    0   20G  0 lvm  /home
sr0            11:0    1 1024M  0 rom
zram0         252:0    0  7.5G  0 disk [SWAP]Improve swap with zram

That's all there is to it. It was easy with Fedora. Different distributions will likely be just as easy, with some possible different details in the package names and commands. Give zram swap a try on your computer. In my next article, I'll demonstrate some further zram options.

Zram is a tool for creating an in-RAM compressed cache, specifically for use as swap space.

Image by:

Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0

Linux Sysadmin What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

AMD EPYC 9554 & EPYC 9654 Benchmarks - Outstanding Performance For Linux HPC/Servers

Phoronix - Fri, 11/11/2022 - 03:30
After showcasing the AMD EPYC 9004 "Genoa" series and geeking out over AMD's reference platform running the Linux-powered open-source OpenBMC, it's time to move on to benchmarking. For evaluating the EPYC Genoa performance under Linux, AMD kindly provided review samples of the EPYC 9654 flagship 96-core processor, the EPYC 9554 64-core processor, and the EPYC 9374F 32-core high frequency CPU. In today's benchmark review I am looking at the EPYC 9554/9654 CPUs while the EPYC 9374F will be featured in its own review in the coming days on Phoronix.

AMD's EPYC 9004 "Genoa" Reference Board Runs The Open-Source OpenBMC

Phoronix - Fri, 11/11/2022 - 03:30
For as exciting and performant as AMD 4th Gen EPYC "Genoa" series processors are with up to 96 cores, AVX-512, and the other impressive Zen 4 enhancements, there was something else subtle that got me really excited with Genoa... AMD's "Titanite" reference board for Genoa is running the open-source, Linux-powered OpenBMC!

AMD Launches EPYC 9004 "Genoa" Processors - Up To 96 Cores, AVX-512, Incredible Performance

Phoronix - Fri, 11/11/2022 - 03:30
Following September's successful launch of the AMD Ryzen 7000 series "Zen 4" desktop processors, today AMD is lifting the embargo on their EPYC 9004 series "Genoa" server processors. EPYC Genoa takes AMD server processors to the new SP5 socket, up to 96 cores / 192 threads per socket, AVX-512 with Zen 4, twelve channels of DDR5 system memory, and much more -- all combined it puts AMD and the industry at new levels of HPC performance. I've been benchmarking the AMD EPYC Genoa processors the past few weeks to astounding success. This article is looking more at the feature set and platform for Genoa while separately are my initial AMD EPYC 9554 / EPYC 9654 Linux review and benchmarks.

NVIDIA 525.53 Linux Driver Brings Dynamic Boost For AMD Laptops, Installer Enhancements

Phoronix - Thu, 11/10/2022 - 23:00
NVIDIA has made available their first public beta in the R525 Linux driver series...

Pages