Rich Freeman wrote:
> On Thu, Feb 8, 2018 at 2:17 PM, Dale <rdalek1...@gmail.com> wrote:
>> As someone else pointed out, if you
>> start using swap, that generally defeats the purpose of tmpfs.
>>
> I'll just add one thing to this, which I've probably already said ages ago:
>
> In an ideal world swap would STILL be better than building on disk,
> because it gives the kernel fewer constraints around what gets written
> to disk.
>
> Anything written to disk MUST end up on the disk within the dirty
> writeback time limit.  Anything written to tmpfs doesn't ever have to
> end up on disk, and if it is swapped the kernel need not do it in any
> particular timeframe.  Also, the swapfile doesn't need the same kinds
> of integrity features as a filesystem, which probably lowers the cost
> of writes somewhat (if nothing else after a reboot there is no need to
> run tmpreaper on it).
>
> So, swapping SHOULD still be better than building on disk, because any
> object file that doesn't end up being swapped is a saved disk IO, and
> the stuff that does get swapped will hopefully get written at a more
> opportune time vs forcing the kernel to stop what is doing after 30s
> (by default) to make sure that something gets written no matter what
> (if it wasn't deleted before then).
>
> That's all in an ideal world.  In practice I've never found the kernel
> swapping algorithms to be the best in the world, and I've seen a lot
> of situations where it hurts.  I run without a swapfile for this
> reason.  It pains me to do it because I can think of a bunch of
> reasons why this shouldn't help, and yet for whatever reason it does.
>


In my experience, once swap starts getting used, it gets slow, sometimes
to the point that a response may take several seconds or more.  When I
compile without tmpfs at all, which means everything is on disk, it's
rare that I can even tell it is using that IO for the drive.  Every once
in a while I may see a slight delay but not by much.  The worst offender
when I do see it, libreoffice.  As we all know, that is one beast of a
package.  I don't recall having problems with web browsers, yet.  Give
it time tho.  ;-) 

While you may have a point in some situations, here, it just doesn't
work that way.  As we all know tho, even if we all had the same
settings, different systems are going to work differently because of
some difference we may not be aware of.  The mileage will vary for sure. 

I might add, over the years I've changed settings to adapt my system to
give me the best response.  However, if a person built a system with
very little differences hardware and maybe even software wise, they
could still run into something different and want different settings. 
The catch is, take advice from different folks and weigh all the
options, then test things to see what works best.  It may be that one
part of your post helps, another part from mine, another part from
someone else and in the end, it leaves settings that work.  Well, on
that system and for that person at least.  ;-)

Dale

:-)  :-) 

Reply via email to