Portál AbcLinuxu, 30. dubna 2025 19:15
SWAP se na servery nedava kvuli vykonu. TeckaNesmysl. I na serveru s 16GB RAM se jádro může rozhodnout něco odswapovat, pokud usoudí, že danou paměť lze využít líp.
Kdyz SWAP neni, proste nastoupi OOMkiller, zabije rozbitou aplikaciKdyby tohle byla obecně pravda, vývojáři jádra by se každou chvíli nepokoušeli opravovat OOM killer. Do správné aplikace (pokud to není naprosto jasné) se totiž tak spolehlivě netrefí.
pokud jsou bezici aplilace alespon trochu spravne nakonfigurovany, tak pamet nedochaziPaměť spolehlivě nedochází pouze v případě, že se zcela zakáže overcommit
Naopak kdyz pamet zacne dochazet, tak je IMO SWAP naopak pritezi, protoze zpusobi treba i hodinovou nedostupnost serveru jako celku.Jestli to nebude spíš rukama...
The argument is basically that if you set swappiness to 100 it does aggressive page scavenging, i.e. the kernel will continuously look for pages that it can reuse. This doesn't however mean that it will always page. It also doesn't mean that if it is using swap that this pages written will ever be paged back in again. The usage of swap is not bad, it's high paging (i.e. moving blocks in and out of swap) that causes poor performance problems and especially with our config where swap in on NFS mounted drives.
If you set swapiness to any other value and in reality it makes little difference if you set it to 40, 60 or 80, then the kernel does not to aggressive scavenging. It will only start to look for pages to scavenge when it gets low on available memory. The down side to this is that when this happens it can cause the machine to 'freeze' whilst this is going on. However, the argument for this is that the machine should have sufficient memory to cope without having to scavenge. Although at best you will only ever minimize this, it's a normal kernel function and it will happen sooner or later.
What I do know for certain is that swappiness MUST be 100 for RAC DB installations. We have seen many times in the past where high loaded DB machines, say at month end, have been evicted from the RAC cluster because the kernel has gone scavenging for free pages and halted all other activity on the machines.
So evidently anything between 0 and 99 behaves pretty much the same – they have seen no real difference in behavior. However at 100 the page stealing daemon runs continuously ensuring memory is kept available. The difference on a system that has plenty of memory is a non-issue. On appropriately sized systems all values will behave pretty much the same. However on machines which begin to get into memory pressure the 100 setting incrementally begins using swap space earlier. What was found was that if it was anything other than 100 then when the paging daemon kicked in it could halt the system as it ran through the memory to clean it up the first time. This caused RAC outages and other instability.
My last conversation with SE suggested this behavior might change in OEL 6.
md=d127,/dev/sda,/dev/sdb root=/dev/md_d127p2Pro disky nad 2 TB používám metadata verze 1.0, zde uz je nutno použít initramdisk. Při použití Grub-legacy narazíte na to, ze nedokáže najít na /dev/md_d127 oddíly, protože většinou se číslo oddílu připisuje za název zařízení (končící písmenem), jenže zde název zařízení končí číslicí za niž se přidává oddělovač "p" a to už Grub-legacy neumí. Náprava je jednoduchá: uděláme symbolický link, vytvořime soubor s mapou zařízení a předáme ji grubu při spouštění:
ln -s md_d127 /dev/md_d127p echo "(hd0) /dev/md_d127p" > /boot/grub/device.map grub --device-map=/boot/grub/device.map
Já bych se initrd ani grub2 nebál.
Já se ho taky nebojím ale tohle používám už roky (verzi menší než 2 TB) a funguje to a to velmi splehlivě, a tehdy byl Grub2 ještě velmi experimentální. A initramdisk je zbytečná komplikace pokud není nezbytně potřeba (jako třeba při netbootu).
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.