Open-source News

GCC 13 "-O2" Performance Being Sped Up With Enabling Small Loop Unrolling

Phoronix - Mon, 11/14/2022 - 18:39
For those compiling their programs using the common "-O2" optimization level as is used for the production builds by many Linux distributions and other software vendors, small loop unrolling is being enabled at this level for GCC 13. Enabling small loop unrolling with -O2 should help the performance in some areas of modern Intel and AMD CPUs...

Linux 6.2 Implementing Dynamic Shadow Call Stack Support For AArch64

Phoronix - Mon, 11/14/2022 - 18:20
The Linux kernel built with Clang has supported Shadow Call Stack "SCS: to prevent return address overwrites. With patches building up for Linux 6.2, Dynamic Shadow Call Stack is being implemented to avoid the overhead of SCS on processors supporting pointer authentication (PAC)...

An Easy Way to Hide Files and Directories in Linux

Tecmint - Mon, 11/14/2022 - 16:18
The post An Easy Way to Hide Files and Directories in Linux first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Do you occasionally share your Linux desktop machine with family members, friends, or perhaps with colleagues at your workplace, then you have a reason to hide certain private files as well as folders or

The post An Easy Way to Hide Files and Directories in Linux first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

5 metrics to track in your open source community

opensource.com - Mon, 11/14/2022 - 16:00
5 metrics to track in your open source community Georg Link Mon, 11/14/2022 - 03:00

The core of open source is about using, sharing, and collaborating in software creation. With its roots in the free software movement and ensuring the rights of software users, open source has evolved from being solely the work of volunteers and hobbyists to also include the enterprise.

Collaborative software development has taken on a new dimension in the last 5 to 10 years. Today open source makes up 58% of software in the enterprise. In fact, 63% of companies in a 2021 survey indicated wanting to increase their use and engagement with open source.

Open source is everywhere and forms the digital infrastructure we rely on. The US issued a directive mandating more software supply chain security. The European Union is also working on similar legislation and guidelines. To address this challenge, you must understand how open source software is built. The process typically involves an open source project.

Selecting the right metric for your open source project

This article analyzes open source projects built by a community. While there are open source projects with only one maintainer or fully controlled by a company, those are excluded to focus on projects with a community.

The specific focus is on the challenges you may face and how to overcome them.

More great content Free online course: RHEL technical overview Learn advanced Linux commands Download cheat sheets Find an open source alternative Explore open source resources Community health check

Discovering the health of an open source project and making decisions has been a huge challenge. Our company, Bitergia, has a history of working on this issue for more than 15 years.

The authors are maintainers of the open source GrimoireLab metrics tools, and we're Official Metrics Partners of foundations like OpenInfra and NumFocus. When the interest grew in community health, we co-founded the CHAOSS project in 2017 as a cooperation with the Linux Foundation in collaboration between industry, academia, and open source.

Today, the CHAOSS community has defined more than 70 metrics and maintains software to get the insights you need. This article is a deep dive into these metrics to understand how they are measured.

CHAOSS metrics are divided into five working groups, each with focus areas.

1. Common metrics
  • Goal: Understand what contributions organizations and people are making.
  • Focus areas: Contributions, time, people, place, and more.
  • One example metric: Type of contributions: Measure the types of contributions made.
2. Value metrics
  • Goal: Identify the degree to which a project is valuable to researchers and academic institutions.
  • Focus areas: Academic value, communal value, individual value, and organizational value.
  • Example metric: Project velocity: What is the development speed for an organization?
3. Evolution metrics
  • Goal: Aspects related to how the source code changes over time and the project's mechanisms to perform and control those changes.
  • Focus areas: Code development activity, code development efficiency, code development process quality, issue resolution, and community growth.
  • Example metric: New contributors: How many contributors are making their first contribution to a given project, and who are they?
4. Diversity, equity, and inclusion metrics
  • Goal: Identify diversity, equity, and inclusion aspects of communities.
  • Focus areas: Event diversity, governance, and leadership in the project and community.
  • Example metrics: Time inclusion for virtual events where the organizers are mindful of attendees and speakers in other time zones.
5. Risk metrics
  • Goal: Understand how active a community is in supporting a given software package.
  • Focus areas: Business risk, code quality, dependency risk assessment, licensing, and security.
  • Example metric: Elephant factor: What is the distribution of work in the community?
Build open communities

The Mozilla Foundation released a report in 2019 on the different types of open source projects, showing that each is created for a different reason, has different governance, chooses different licenses, and engages users and other developers to various degrees.

Your community is important, so checking in on it is essential. But what do you do once you've defined what to measure? How do you get the metrics, and once you have them, what do you do with them? The following article discusses the next steps.

The CHAOSS community has defined more than 70 metrics and maintains software to get the insights you need. Here are the five focus areas you should pay attention to.

Image by:

Opensource.com

Community management Data Science What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. 65 points Madrid, Spain

Emilio has 5+ years of experience in business and marketing across different industries and countries. His academic background includes a Bachelors degree in Business from Americana University and a Masters degree in Marketing and Sales from the EAE Business School.

Emilio is currently the Marketing Specialist at Bitergia in Madrid, Spain. He creates content and writes about open source community, metrics, and analytics.

Outside of work, his hobbies include traveling, playing video games, and boxing.

LinkedIn profile: https://www.linkedin.com/in/emilio-galeano-gryciuk/

Open Enthusiast Author Register or Login to post a comment.

Make swap better with zram on Linux

opensource.com - Mon, 11/14/2022 - 16:00
Make swap better with zram on Linux David Both Mon, 11/14/2022 - 03:00

Zram is a compressed RAM disk on Linux. Lately, it's been put to use for swap space on many distributions. In my previous article, I introduced zram and demonstrated how to use it. In this article, I cover some of the ways you can customize how your system puts zram to use.

Augmented swap

Zram swap can be augmented with standard secondary storage devices. Adding some traditional swap space can be especially useful on systems with low amounts of RAM. (Such augmentation isn't normally useful on hosts with very large amounts of RAM.)

If you do choose to augment swap with some type of storage device, hard drives do still work but are significantly slower than using SSD in either SATA or m.2 formats. However, the flash memory in SSD devices has a more limited life than HDD devices, so systems with large amounts of swap activity can significantly reduce the lifespan of an SSD.

Tuning swap

There's more to tuning swap space than simply allocating a specific amount of swap space. There are other factors that can be used to manage how swap space is used and managed by the system. Swappiness is the primary kernel parameter that can be used to manage swap performance.

I recently wrote How I troubleshoot swappiness and startup time on Linux, in which I discussed the vm.swappiness kernel setting. The short version is that the default setting for how aggressively the Linux kernel forces swapping to begin and to function is 60. Zero (0) is the least aggressive and 100 (or 200, depending on what you read) is the most aggressive. At that level, I was experiencing delays when working with very large documents in LibreOffice despite having 64 GB of RAM in my primary workstation, much of which was unused.

The resolution to this problem is to reduce the vm.swappiness kernel parameter to 13. This works well for my use cases, but you may need to experiment to get it right for your environment. Read the linked article for the details.

You can also find more general information about tuning the Linux kernel in my article How to tune the Linux kernel with the /proc filesystem.

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 Swap size recommendations

At this time, I have found no recommendations from any distribution for swap size when using zram. Based on my personal experience, I have found that having at least a little swap space can be beneficial. Even when you have large amounts of RAM, just the fact that properly tuned swap for your environment is being used and contains data can indicate that more RAM is needed.

The default zram swap size, listed in my previous article, is more than sufficient for that purpose. It has worked well so far on all of my Linux hosts.

In my opinion, the ultimate purpose of swap space is to be a small buffer — a red flag – that lets the system administrator know when more RAM is needed in a system. Of course, some very old hardware cannot support more than 4 or 8 GB of RAM. In such a case, a new motherboard is needed – one which will support enough RAM to perform the task at hand.

My recommendation is to do as I have. I set up zram swap of the default size on every one of my hosts. I removed all existing swap partitions (I don't use swap files), and my hosts have all been running perfectly with that swap setup.

Removing traditional swap partitions and files

Because I've just recommended removing all of the old swap partitions, I should also mention that the process to do so is not as straightforward as it should be. It's not hard, but it took me some research to figure it out because there's a lot of old and incorrect information out there on the Internet. This procedure works for me on Fedora 36.

  1. Turn off swap for the existing swap partitions and files.

    This can be done using swapoff /dev/nameofswapdevice but it might be easiest to just turn off all swap with the swapoff -a command. This command also turns off any existing zram swap.

  2. Remove the entries for traditional swap partitions or files in the /etc/fstab file. I just commented these out, in case of unexpected problems. I deleted those entries later. Zram swap does not require an entry in the /etc/fstab file.

  3. The default /etc/default/grub configuration file is simple, and you only need concern yourself with one line:

    GRUB_TIMEOUT=5
    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
    GRUB_DEFAULT=saved
    GRUB_DISABLE_SUBMENU=true
    GRUB_TERMINAL_OUTPUT="console"
    GRUB_CMDLINE_LINUX="resume=/dev/mapper/vg01-swap \
    rd.lvm.lv=vg01/root rd.lvm.lv=vg01/swap \
    rd.lvm.lv=vg01/usr rhgb quiet"
    GRUB_DISABLE_RECOVERY="true"
    GRUB_ENABLE_BLSCFG=true

    Change the GRUB_CMDLINE_LINUX line to:

    GRUB_CMDLINE_LINUX="rd.lvm.lv=vg01/root rd.lvm.lv=vg01/usr"

    Removing resume=/dev/mapper/vg01-swap and rd.lvm.lv=vg01/swap prevents the kernel from looking for the swap volume.

  4. You must save these changes with grub2-mkconfig. First, make a backup of the current /boot/grub2/grub.cfg file, and then run the following command:

# grub2-mkconfig > /boot/grub2/grub.cfgTroubleshooting zram

It's important to follow all of these steps. Removing rhgb quiet causes all kernel boot messages and systemd startup messages to be displayed. This can make it easier to quickly locate problems during the boot and startup phases.

When I first tried this, I removed the logical volume I'd designated as swap space, and then rebooted to test. The reboot failed and hung early in the boot process.

Fortunately, I've set the kernel so that it displays boot and startup messages rather than the graphical boot. As a result, I was able to see the error message indicating that the kernel couldn't find the swap volume.

If this happens to you because you've missed a step, then boot from a Live Fedora USB drive, and create a new swap volume. It's not necessary to do anything else. Then reboot and remove the swap entries in kernel line of /etc/defaults/grub.

Using only zram swap

After removing swap partitions and regenerating the GRUB config, I ran swapon -a and verified with swapon -show and lsblk. Rebooting the system gave me a final assurance that the system did boot properly and that the only swap is the zram swap.

Zram is a tool that's meant for creating compressed virtual swap space. The ideal swap configuration depends on your use case and the amount of physical RAM in your host computer. No matter what combination of zram, swap partitions, and swap files you use for swap, you should always experiment with your own system loads, and verify that your swap configuration works for you. However, using the default zram swap without any traditional swap partitions or files works as well for me — as well as any other swap configuration I've ever used, and better than many.

The ideal swap configuration depends on your use case and the amount of physical RAM in your host computer.

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.

How To Remove SSL Certificate and SSH Key Passphrase in Linux

Tecmint - Mon, 11/14/2022 - 14:44
The post How To Remove SSL Certificate and SSH Key Passphrase in Linux first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Brief: Have you created a certificate key or private key with a passphrase and wish to remove it? In this guide, we will show how to remove a passphrase using the openssl command line

The post How To Remove SSL Certificate and SSH Key Passphrase in Linux first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Pages