amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
521 stars 39 forks source link

[Package Request] - tuned #327

Open thimslugga opened 1 year ago

thimslugga commented 1 year ago

What package is missing from Amazon Linux 2023? Please describe and include package name.

tuned

https://tuned-project.org/

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/performance_tuning_guide/sect-red_hat_enterprise_linux-performance_tuning_guide-performance_monitoring_tools-tuned_and_tuned_adm

Is this an update to existing package or new package request?

new package request

Is this package available in Amazon Linux 2? If it is available via external sources such as EPEL, please specify.

Yes it's part of AL2.

https://docs.aws.amazon.com/linux/al2023/release-notes/removed-packages.html#removed-list-packages

https://packages.fedoraproject.org/pkgs/tuned/

Any additional information you'd like to include. (use-cases, etc)

isenberg commented 6 months ago

With the tuned package now missing on current Amazon Linux: Which cost-efficient simple alternative exists to persistently store Linux configurations for /sys/kernel over a reboot? I see the sysfsutils package exists, but that's a different one than the identically named on Ubuntu where that package uses configuration files below /etc/sysfs.d for permanently modifying settings below /sys/kernel and the AL2023 version doesn't offer that functionality.

isenberg commented 6 months ago

I'm now continuing with the solution as simple single-file system service as that works fine. Using the following systemctl service parameters to get it set early enough before apps are started:

[Unit]
Requires=local-fs.target
Before=network.target
[Service]
Type=oneshot
RemainAfterExit=true

If anyone knows better ways to persistently easily configure Linux /sys settings please comment.

thimslugga commented 1 month ago

If anyone knows better ways to persistently easily configure Linux /sys settings please comment.

You can use tmpfiles.d for this task.

1st example:

cat <<'EOF' | sudo tee /etc/tmpfiles.d/ksm.conf

w /sys/kernel/mm/ksm/run - - - - 1

EOF

2nd example:

cat <<'EOF' | sudo tee /etc/tmpfiles.d/custom.conf

w /sys/kernel/mm/transparent_hugepage/enabled - - - - madvise
w /sys/kernel/mm/transparent_hugepage/shmem_enabled - - - - advise
w /sys/kernel/mm/transparent_hugepage/defrag - - - - never

EOF