Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-04-08 Thread Stefan Lendl
Thomas Lamprecht writes: > Am 08/04/2024 um 14:04 schrieb Stefan Lendl: >> I agree summing up processes it would make sense to use PSS. >> Unfortunately, ps does not report the PSS. > > The `ps` from the Debian Bookworm version of the `procps` package does report > it here if I use something

Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-04-08 Thread Thomas Lamprecht
Am 08/04/2024 um 14:04 schrieb Stefan Lendl: > I agree summing up processes it would make sense to use PSS. > Unfortunately, ps does not report the PSS. The `ps` from the Debian Bookworm version of the `procps` package does report it here if I use something like `ps -C kvm -o pss` though, FWICT

Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-04-08 Thread Stefan Lendl
Thomas Lamprecht writes: > Hi, > > Am 28/02/2024 um 23:47 schrieb Roland: >> any reason why this did not get a response ?  (i do not see rejection of >> this  ,nor did it appear in >> https://git.proxmox.com/?p=ksm-control-daemon.git;a=summary ) > > No reason, but even if this looks pretty

Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-02-29 Thread Roland via pve-devel
--- Begin Message --- FWIW, depending on how the sum is used it might actually make even more sense to use PSS, i.e., the proportional set size which better accounts for shared memory by dividing that part between all its users, as if e.g. 10 QEMU processes have 100 MB of shared code and what not

Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-02-29 Thread Stefan Lendl
Roland writes: > Hi Stefan, > > looks good for me so far and indeed, on very large system when VMs eat > up >2TB this could hit the limit very soon. > > but shouldn't we add some newline , as the original "print sum" prints one ? > > root@s740:/usr/sbin# seq 1 10 | awk '{ sum += $1 }; END {

Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-02-29 Thread Stefan Lendl
Roland writes: > oh, and shouldn't we also add that to total and free_memory calculation, > even chances are less that the limit is hit there ? > > total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo` total does not require the printf fix because it does not do any calculation. The "print $2"

Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-02-29 Thread Stefan Lendl
Roland writes: > oh, and shouldn't we also add that to total and free_memory calculation, > even chances are less that the limit is hit there ? > > total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo` > > free_memory () { >     awk '/^(MemFree|Buffers|Cached):/ {free += $2}; END {print free}' \

Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-02-29 Thread Roland via pve-devel
--- Begin Message --- oh, and shouldn't we also add that to total and free_memory calculation, even chances are less that the limit is hit there ? total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo` free_memory () {     awk '/^(MemFree|Buffers|Cached):/ {free += $2}; END {print free}' \

Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-02-29 Thread Roland via pve-devel
--- Begin Message --- Hi Stefan, looks good for me so far and indeed, on very large system when VMs eat up >2TB this could hit the limit very soon. but shouldn't we add some newline , as the original "print sum" prints one ? root@s740:/usr/sbin# seq 1 10 | awk '{ sum += $1 }; END { print

Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-02-28 Thread Thomas Lamprecht
Hi, Am 28/02/2024 um 23:47 schrieb Roland: > any reason why this did not get a response ?  (i do not see rejection of > this  ,nor did it appear in > https://git.proxmox.com/?p=ksm-control-daemon.git;a=summary ) No reason, but even if this looks pretty straight forward, positive feedback would

Re: [pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-02-28 Thread Roland via pve-devel
--- Begin Message --- hi, any reason why this did not get a response ?  (i do not see rejection of this  ,nor did it appear in https://git.proxmox.com/?p=ksm-control-daemon.git;a=summary ) and, while we are at ksmtuned, i think it's is broken, especially when run on ZFS based installations, as

[pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

2024-01-25 Thread Stefan Lendl
awk internally uses float for every calculation, printing a large float with awk results in 1.233e+09 format which causes the script to fail afterwards. Instead I am printing the float without decimals. Signed-off-by: Stefan Lendl --- debian/patches/awk-printf.diff | 16