Re: Swap

Jos Collin <[email protected]>
Newsgroups gmane.linux.debian.user.laptop
Message-ID <CALsRJ1Ls8HZo=ZwZwdJDmieAVJcE9F=CTZ=rzfqSN4La0Lh9Tw@mail.gmail.com>
I have never monitored my RAM usage. I have been allocating RAM Size x 2
until now for all my systems.
On 04-Feb-2016 9:32 PM, "Matus UHLAR - fantomas" <[email protected]> wrote:

> On 04.02.16 21:12, Jos Collin wrote:
>
>> How much swap space does 4GB ram ideally requires ? I have been using the
>> rule "RAM size x 2" for calculating the size of swap. But as the RAM sizes
>> are bigger nowadays, is this a wrong calculation ?
>>
>
> yes.
>
>> I mean, is it okay if I
>> use 1 GB of swap space (or lesser) for a 4gb RAM ?
>>
>
> it highly depends on your usual needs and how much of RAM you use in peaks.
> I run without swap on many machines for some years already.
> Do you monitor your RAM usage?
>
> on some servers I use 3GiB, with the only reason for having swap is to
> notice system slowdown when it starts swapping.
> You can try e.g. enable zswap so kernel will use the 1GB swap even more
> effectively.
>
> Similarly you can reserve some memory for zram block device and swap to it.
>
>
> Another trick is to use swap and mount /tmp on tmpfs (which means, on
> virtual memory), although some people discourage this because (some) people
> or applications tend to fill /tmp with bloat.
> ...you can avoid this problem by limiting tmpfs size
>
>
> --
> Matus UHLAR - fantomas, [email protected] ; http://www.fantomas.sk/
> Warning: I wish NOT to receive e-mail advertising to this address.
> Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
> - Have you got anything without Spam in it?
> - Well, there's Spam egg sausage and Spam, that's not got much Spam in it.
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.