![]() |
Its good iddea add swap in SSD? - Printable Version +- Maui Forums (https://forums.mauilinux.org) +-- Forum: Community (https://forums.mauilinux.org/forumdisplay.php?fid=7) +--- Forum: General Talk (https://forums.mauilinux.org/forumdisplay.php?fid=80) +--- Thread: Its good iddea add swap in SSD? (/showthread.php?tid=24418) |
Its good iddea add swap in SSD? - wonder - 8th May 2017 Hi, In the past, with 8 GB of RAM and a mechanical hard drive, I don't add a swap. I read in the last days that, the new kernel 4.11 are optimized for SSD (and swap in SSD) and this, open in me a question or doubt. A computer, for example, with 8 GB RAM, with SSD, its good iddea add swap? Always, I was think that, with 4, 8 or more RAM and with mechanic hard drive, not, not good iddea add swap (in my lasts years I don't use swap) but yesterday, I was read the article of new kernel with optimization for SSD....and generate a doubt about this... Regards! RE: Its good iddea add swap in SSD? - leszek - 8th May 2017 I don't add real swap for years here now on my hardware. I just use zram for compressed swap in RAM which is still faster as Swap on a SSD. You need more RAM occasionally when compiling heavy projects like Firefox, Chromium or LibreOffice. If you do heavy video editing (4k video editing) it might exceed the memory available and needs to use swap. Swap is also used sometimes if you just start a lot of applications and don't tend to close them and just use standby to ram also so you don't turn off your laptop/pc basically. This might then also end up eating RAM. For everything else day to day you might not need swap but I personally recommend you to just install the package zram-config just in case so that if you exceed RAM usage it will at least have something to swap to ![]() RE: Its good iddea add swap in SSD? - wonder - 8th May 2017 Hello. Yes, I also that, I don't add real swap for a years. But yesterday, when I read the article for new kernel, this article generate in me a doubt about this.. Generally, I don't close my navigator also not close TB, not compiling, but yes, I editing video and audio, and never, turn off my pc, always, stand by. In some times, I view in Info Center that, my available memory are 2 o 3%, after a some works or time, up to 10-15-20%. In this moment I have 8 GB RAM but I think in add other 8GB, in total, 16GB. In some times (only, 3, 4 or 5 times) when editing video and I was configured for preview audio (in kdenlive) my memory available was to 0, and I can't open other application. After search about this I view that, the pluggin in kdenlive for preview audio consume a lot off memory, I disabled this option. And thank you very much for indicate zram-config, I ignored this option entirely, I go to search info about this for install and config ![]() Thank you very much! RE: Its good iddea add swap in SSD? - kdemeoz - 8th May 2017 (8th May 2017, 11:09)leszek Wrote: ... I personally recommend you to just install the package zram-config just in case so that if you exceed RAM usage it will at least have something to swap to This fascinated me; i did not know of this package. I've now researched it, then tested it in my 2 Maui VMs, to help me decide if i will take the plunge to actually install it into my real Mauis in Lappy & Tower [& maybe also then use gparted & fstab to remove my existing Swap partitions]. The VM results seem remarkable: System [VB VM] Base Memory 4096 Processor(s) 2 Code: kdemeoz@Maui-VM:~$ cat /proc/swaps All that looks great, but i have one question: does zram in any way conflict with / steal memory from tmpfs [in which as you can see i run /tmp; pls note -- all the following is from my VM, but i do use a similar arrangement in my real Mauis]: Code: kdemeoz@Maui-VM:~$ df -h RE: Its good iddea add swap in SSD? - rocky7x - 9th May 2017 Just to add my 2 cents ![]() RE: Its good iddea add swap in SSD? - kdemeoz - 10th May 2017 (9th May 2017, 16:44)rocky7x Wrote: Just to add my 2 cents Agree - hence i deliberately put my Swap partition on my HDD not my SSD when i setup my Tower. However, correct me if i'm mistaken, but that [good] advice only pertains to a physical Swap partition, doesn't it? My [new] interest, having learned of it from leszek's cool info, is now zram - which i thought i understood runs in RAM somehow [?], in which case the "traditional" Swap writes-caution doesn't apply...? Having searched online for "zram vs tmpfs", i still have no clear answer, hence i still don't really understand if they coexist correctly, or would cause me problems. Whilst the following will seem crude, here is a basic idea of why i'm confused. 1. tmpfs occupies RAM 2. zram occupies RAM [albeit compressed] 3. Swap partition exists on a physical drive, & exists for data transfer once RAM is all consumed 4. If RAM space is consumed not only by the usual instantaneous working data, but also by tmpfs, & maybe also now by zram, then arithmetically there is now less free RAM available for newer working data... which ironically then increases the chance of Swap space being needed. 5. If that Swap is the traditional physical partition, then of course system responsivity decreases, but nothing catastrophic will occur. 6. Conversely if there is no physical Swap partition, but "only" zram, the system attempts to swap working data into this, but given this IS in RAM, & swapping is ONLY needed when RAM is low or exhausted... well, how can this work? Isn't this kinda like the old joke about trying to lift yourself off the ground by your shoelaces? 7. Additionally, how do zram & tmpfs negotiate with each other to decide "who" will get to grab the specific working data that the kernel is trying to swap out? If they "argue" instead of "cooperate", then surely "bad things" will result? As you can see, i still don't understand. RE: Its good iddea add swap in SSD? - leszek - 10th May 2017 tmpfs does not conflict with zram. RE: Its good iddea add swap in SSD? - kdemeoz - 10th May 2017 Thank you. |