Originally posted by Old Grouch
View Post
Yes a ramdisk block device with swap put on it also works.
Any form of functional swap will do. When I say functional that memory is transferred from where it is and put else where and is able to be put back automatically in case of the memory being accessed.
Why the no swap problem such is argument end user effects depend on:
1) configuration of kernel
2) version of the kernel
3) that hardware your kernel is using(yes what drivers are being used)
4) software you are using.(does the software take advantage of huge pages? is a key question here)
5) uptime of system.(short uptime fragmentation comes less of issue)
Any one or combination of these 5 facts means running with no swap file you might see any problem. Also particular combinations you are going to not have problems with huge pages when you should have them.
Lots of works for me people out there but there is also lots of it breaks for me people out there as well. Hard part is both parties are technically right.
Using Huge Pages
If the user applications are going to request huge pages using mmap system call, then it is required that system administrator mount a file system of type hugetlbfs:
If the user applications are going to request huge pages using mmap system call, then it is required that system administrator mount a file system of type hugetlbfs:
You do need to have heads up that turned of swap if you have to turn on huge pages in future for some applications you may be needing something swap back. Good part is the physical memory defragmentaiton you can get away with like 1mb of swap set to the lowest priority swap you have ever seen. Yes 1mb is most likely oversized. This is because the Linux kernel small pages that cause the problem of being in the wrong place so are only 4kb in size each. 1mb/4k is quite a few pages that can be shoved out to swap at any one time.
The other issue is fragmented physical memory you can at times notice reduced DMA performance(same thing lack of means to to continuous physical memory allocations) again this is going to be days/weeks/months(usage pattern is a factor here) of running not hours of running before the problem get bad. So a person who reboots there computer every 24 hours is most likely not going to notice any problem with fragmentation of physical memory caused by no swap resulting in those people claiming no problem.
The DMA transfer slowdown as physical memory fragments MS Windows also suffers from so a person can think it normal for a long run PC to slightly lose transfer performance when that is not in fact the case because this is symptom of memory management defect. This one a person can claim everything fine when it not because what they class is normal is not right.
Things not seam quite right on no swap putting a small zram swap back and see what happens can be a good move because if all your problems go away there is something you are doing finding the problems that come out of memory fragmentation.
Leave a comment: