uwe_keim
(Uwe Keim)
2024 年2 月 2 日 13:40
21
I’m trying but getting this:
$ echo 'sys.kernel.mm.transparent_hugepage.enabled=never' > /etc/sysctl.d/10-huge-pages.conf
-bash: /etc/sysctl.d/10-huge-pages.conf: Permission denied
$ sudo echo 'sys.kernel.mm.transparent_hugepage.enabled=never' > /etc/sysctl.d/10-huge-pages.conf
-bash: /etc/sysctl.d/10-huge-pages.conf: Permission denied
My server is an Ubuntu Server 22.04.3 LTS.
Firepup650
(Firepup Sixfifty)
2024 年2 月 2 日 13:56
22
Try running it in a root shell, it might be struggling with being in a normal shell. (You’re sudo
ing the echo, but not the pipe to the file)
1 个赞
Ed_S
(Ed S)
2024 年2 月 2 日 14:17
23
Indeed, several ways to do it, here’s one
sudo sh -c "echo 'sys.kernel.mm.transparent_hugepage.enabled=never' > /etc/sysctl.d/10-huge-pages.conf"
1 个赞
uwe_keim
(Uwe Keim)
2024 年2 月 2 日 14:19
24
I’ve ran the scripts and rebooted.
Then:
$ cat /proc/sys/vm/overcommit_memory
1
and
$ cat /sys/kernel/mm/transparent_hugepage/enabled
always [madvise] never
(So first thing changed from 0 to 1 but second thing still returns the same).
Ed_S
(Ed S)
2024 年2 月 2 日 14:20
25
Odd. What do you get from
cat /etc/sysctl.d/10-huge-pages.conf
Perhaps try the echo again?
Ed_S
(Ed S)
2024 年2 月 2 日 14:22
26
Oh wait, the two lines to run are supposed to write to two different files. Looks like you’ve written to the same file twice.
Firepup650
(Firepup Sixfifty)
2024 年2 月 2 日 14:22
27
Is it perhaps supposed to be always [madvise] never
?
Ed S:
report the output of these commands
cat /proc/sys/vm/overcommit_memory
cat /sys/kernel/mm/transparent_hugepage/enabled
On my systems I have
# cat /proc/sys/vm/overcommit_memory
1
# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
1 个赞
Ed_S
(Ed S)
2024 年2 月 2 日 14:24
28
Not according to the Opinionated Guide. Hugepages not a win in normal circumstances, I gather - experts who want to enable them are presumably expert enough to do it right.
1 个赞
uwe_keim
(Uwe Keim)
2024 年2 月 2 日 14:30
30
$ cat /etc/sysctl.d/10-huge-pages.conf
sys.kernel.mm.transparent_hugepage.enabled=never
Not a big deal, I do think the system works good enough .
Ed_S
(Ed S)
2024 年2 月 2 日 14:33
31
More important to get the overcommit setting right, I think
1 个赞
Could be the type of processor for the server might make a difference?
1 个赞
Ed_S
(Ed S)
2024 年2 月 2 日 17:00
33
ARM vs x86? Just possibly. I see someone somewhere wondered if having more CPUs might mean more threads run and so use more memory - that just might be. Of course the biggest difference is the forum content, but I’m not sure how much difference that could make. I think some steps in upgrade are database scheme tweaks.
And then there are the kernel tunables… but in this case @Jagster had the same settings as @uwe_keim .
1 个赞
Jagster
(Jakke Lehtonen)
2024 年2 月 2 日 18:37
34
Intel x86, 2 vcpu.
Quite common setup for smaller forums I would say.
2 个赞
system
(system)
关闭
2024 年3 月 3 日 18:38
35
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.