Page 1 of 2
SWAP == 0
Posted: Fri 18. Nov 2022, 12:10
by Tobi
Wenn die SWAP Partition nicht existiert müsste diese eigentlich auch nicht im Dashboard angezeigt werden.
- null_prozent.png (3.72 KiB) Viewed 959 times
Re: SWAP == 0
Posted: Fri 18. Nov 2022, 12:16
by Tobi
Nachtrag:
Die Anzeige des Arbeitsspeichers ist mir auch nicht verständlich...
Irgendwie stimmt beides nicht. Der Server hat 64 GB Ram.
Diese Kommawerte sind bei Ram (Gesamt) nicht wirklich zielführend
Dezimal 1 KB == 1000 Byte
- 64gb.png (4.6 KiB) Viewed 957 times
Binär 1 KB == 1024 Byte
- 64bin.png (4.75 KiB) Viewed 957 times
Re: SWAP == 0 [GELÖST]
Posted: Fri 18. Nov 2022, 14:24
by Alexander
Tobi wrote: ↑Fri 18. Nov 2022, 12:10
Wenn die SWAP Partition nicht existiert müsste diese eigentlich auch nicht im Dashboard angezeigt werden.
-> Erledigt.
Tobi wrote: ↑Fri 18. Nov 2022, 12:16
Diese Kommawerte sind bei Ram (Gesamt) nicht wirklich zielführend
Sag das den Speicher-Herstellern. Die Werte gehen doch nie auf. Hab in meinem Arbeitsrechner 32 GB (laut Hersteller).
Tatsächlich sind es 33.58 GB bzw. 31,28 GiB.
Kannst du gern selbst überprüfen mittels:
(Ausgabe in Byte)
Gesamt = Spalte 1
Frei = Spalte 3 + 5
Belegt = Gesamt - Frei
Re: SWAP == 0
Posted: Fri 18. Nov 2022, 15:32
by Tobi
Alexander wrote: ↑Fri 18. Nov 2022, 14:24
-> Erledigt.
Danke!
Alexander wrote: ↑Fri 18. Nov 2022, 14:24
Sag das den Speicher-Herstellern. Die Werte gehen doch nie auf. Hab in meinem Arbeitsrechner 32 GB (laut Hersteller).
Tatsächlich sind es 33.58 GB bzw. 31,28 GiB.
Ich dachte mir schon, dass sowas der Grund sein wird. Aber wie wäre es denn wenn du an dieser Stelle einfach mit den Standardwerten rechnest / rundest? Selbst deine 31,XY machen nicht wirklich Sinn, da ich noch nie halbe Megabytes auf einem Ram Riegel gesehen habe
.
Oder ganz pragmatisch...
In den Einstellungen, dort wo man KB / kiB umschaltet, bei "Maßeinheiten", dort kann der Admin selbst eintragen wieviel RAM die Kiste hat.
So richtig LOWLEVEL halt
Re: SWAP == 0
Posted: Fri 18. Nov 2022, 15:51
by Tobi
ergibt bei mir "64318" und würde dann gerundet mit "64 GB" passen.
Re: SWAP == 0
Posted: Fri 18. Nov 2022, 15:59
by Alexander
Tobi wrote: ↑Fri 18. Nov 2022, 15:51
ergibt bei mir "64318" und würde dann gerundet mit "64 GB" passen.
Das wäre aber nicht korrekt gerundet: "free -m" gibt dir die Ausgabe in MiB also zur Basis 1024, was, wenn man es dann in GiB umrechnet (also durch 1024), 62,81 GiB (gerundet 63 GiB) ergibt.
Kannst dir ja gern mit der White-Label Funktion dort anzeigen lassen, was auch immer du möchtest
.
Re: SWAP == 0
Posted: Fri 18. Nov 2022, 16:02
by Tobi
Bei Server zwei kommt "64259" als Ergebnis.
Mit "gerundet" meinte ich in diesem Fall "auf die ersten zwei Stellen abgeschnitten"
Re: SWAP == 0
Posted: Fri 18. Nov 2022, 16:04
by Alexander
... aber das funktioniert ja nicht, wenn "free -m" die Basis 1024 hat
. Wenn es die Basis 1000 hätte, ja, aber so summiert sich das.
Beispiel: 128.000 MiB == 125 GiB und nicht 128 GiB.
(Aus diesem Grund lieber mit free -b schauen und dann in ein Zahlenformat seiner Wahl umwandeln)
Re: SWAP == 0
Posted: Mon 21. Nov 2022, 16:52
by BasHeijermans
Tobi wrote: ↑Fri 18. Nov 2022, 12:10
Wenn die SWAP Partition nicht existiert müsste diese eigentlich auch nicht im Dashboard angezeigt werden.
null_prozent.png
Sorry, I do not agree. As swapping doesn't need a partition anymore for it to work.
It can also swap to file if no partition exists.
https://itsfoss.com/create-swap-file-linux/
Ergo it's basically impossible to know if swap is turned off in total. It will and can swap with and without a partition.
Re: SWAP == 0
Posted: Mon 21. Nov 2022, 17:00
by 24unix
BasHeijermans wrote: ↑Mon 21. Nov 2022, 16:52
Ergo it's basically impossible to know if swap is turned off in total.
Code: Select all
─➤ free|grep -i swap 1 ↵
Swap: 16777212 157976 16619236
╰─➤ grep -i swapf /etc/fstab
/swapfile swap swap defaults 0 0
Wow, so impossible …
Re: SWAP == 0
Posted: Mon 21. Nov 2022, 17:13
by BasHeijermans
24unix wrote: ↑Mon 21. Nov 2022, 17:00
Wow, so impossible …
Point taken, but why would anybody turn off swap in total, makes no sense to do that.
It's the last resort to keep your system from crashing when it runs out of ram.
I would never want to run Linux without swapping, never ever.
Re: SWAP == 0
Posted: Mon 21. Nov 2022, 17:32
by 24unix
BasHeijermans wrote: ↑Mon 21. Nov 2022, 17:13
24unix wrote: ↑Mon 21. Nov 2022, 17:00
Wow, so impossible …
Point taken, but why would anybody turn off swap in total, makes no sense to do that.
It's the last resort to keep your system from crashing when it runs out of ram.
It was, years ago, before oomd.
https://www.freedesktop.org/software/sy ... rvice.html
BasHeijermans wrote: ↑Mon 21. Nov 2022, 17:13
I would never want to run Linux without swapping, never ever.
You don't have to. I don't do it either, on most of my machines.
But it's not uncommon in current vServers, which might run Keyhelp.
This is a cheap (~2 €) vServer, there I don't even use a swapfile.
Code: Select all
# free
total used free shared buff/cache available
Mem: 2030464 756912 104504 10412 1169048 1230488
Swap: 0 0 0
It's my secondary NS and backup mail. No need for swap.
Re: SWAP == 0
Posted: Mon 21. Nov 2022, 18:23
by BasHeijermans
I agree.
I run a VPS too, with 2GB and 40GB diskspace, works very good.
Yet I do not remove the swap.
Code: Select all
total used free shared buff/cache available
Mem: 2097152 740984 953816 32508 402352 1323652
Swap: 0 0 0
As diskspace is not an ussue:
Code: Select all
Bestandssysteem Grootte Gebruikt Besch Geb% Aangekoppeld op
/dev/ploop18368p1 50G 7,2G 41G 16% /
A bit of swapping when needed is not an issue.
We run about 4 domain on it, private use on not heavy traffic.
However, I still do not see the point to bother Alex over this, as a normal hosting-server using KeyHelp will not and should not turn off swapping.
For me this is a nonsense issue to be taken seriously.
Re: SWAP == 0
Posted: Mon 21. Nov 2022, 18:31
by 24unix
BasHeijermans wrote: ↑Mon 21. Nov 2022, 18:23
However, I still do not see the point to bother Alex over this, as a normal hosting-server using KeyHelp will not and should not turn off swapping.
My example was from a NetCup VPS. Per default no swap.
Same for one customer's machine, hosted in Hamburg at ArtFiles.
No swap.
For Alex that would be no more than a finger exercise to remove the display if no swap is present.
oomd is making a good job, and there are many myths around about using swap on a SSD.
My server@home has got the system on a mdadm Raid0 on SSD. With a swapfile on it.
No issues for 8 years.
Last week I replaced them, not because they were broken, but because I got 2 120GB SSD for ~30€ from Amazon.
They are just faster these days.
Re: SWAP == 0
Posted: Mon 21. Nov 2022, 19:13
by BasHeijermans
Raid 0 is not something I would ever use.
I have used RAID 5, 6, 0+10, 10+0 and all variants.
Never ever again.
Lost too many data over the years, when that happens and a backup failed, you never use raid other then RAID1.
Oomd is rubbish, I do not use it. It can kill mysql and then you loose KeyHelp.
Sorry, I rather have a bit of swapping then oomd.
You use your way, I use mine, but oomd is not something I want to use.
SSD's do not die after 10 years, they often last longer. I still have an Intel 40GB, one of the first, it's still fine, no problem at all.
I use 500GB SSD's for my servers and they have a lot of traffic, no issue what so ever, the eldest is about 6 years old.
3D-SSD's last even longer. I use a few harddisks as old-fashion backups, but never needed them, so far.