Dear All
I noticed that after issuing the command
swapoff -a
my system becomes much faster and responsive
How can I permanently use my computer without swap?
Thanks for any help
Catarano
Dear All
I noticed that after issuing the command
swapoff -a
my system becomes much faster and responsive
How can I permanently use my computer without swap?
Thanks for any help
Catarano
Just don’t mount it. Remove it from the list of mounts in /etc/fstab with YaST or a text editor.
But something is seriously deficient with your system if turning off swap makes it much faster. The system prefers to reuse buffers and caches when memory is needed, rather than use swap. An adequate system in normal operation seldom uses swap even when it is mounted.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Exactly on all points. Disabling swap shouldn’t really help your
performance unless you are using it heavily, in which case you lack RAM
to run without swap and turning it off will just lead to things not
loading that would otherwise have loaded but been slow. Which
benchmarks were you using to do your tests?
Good luck.
ken yap wrote:
> Just don’t mount it. Remove it from the list of mounts in /etc/fstab
> with YaST or a text editor.
>
> But something is seriously deficient with your system if turning off
> swap makes it much faster. The system prefers to reuse buffers and
> caches when memory is needed, rather than use swap. An adequate system
> in normal operation seldom uses swap even when it is mounted.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJCGPw3s42bA80+9kRAh0vAJsE5asqihJMkLp45NhQLZKnLz1Z1wCeKBi7
ChdB0+WQjLHj9QNXDn7nBdQ=
=7ijY
-----END PGP SIGNATURE-----
Thanks for your answers
what I am having a look at is
web browsing with firefox, launching time for various applications such as openoffice, skype, amarok, gimp, playing halo in wine.
I am using a computer with a core2duo processor at 2 GHz, SATA HD, nvidia 7300 GT graphic card and 2 GB of ram.
Is there any benchmark that you can suggest which would give me some more “quantitative” answers?
Thanks a lot again
Catarano
Well you should make sure that your two tests run under equal conditions. You should do one test with swap enabled, reboot with no swap and do the exact same test. It’s no good to turn off swap halfway. At that point your buffers have already been filled with cached information so it may be faster anyway whether you turn off swap or not.
You can also observe the use of swap in /proc/meminfo, or summarised by the “free” command. Typically usage is quite low and stays that way. For example the output of free on my system is:
total used free shared buffers cached
Mem: 1027112 933816 93296 0 65984 132436
-/+ buffers/cache: 735396 291716
Swap: 2104432 7236 2097196
That’s 7MB of swap used after a whole day’s usage.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I cannot honestly claim to be a benchmarking expert but a lot of things
can contribute to the result of your test based on how you did it.
First, filesystem caching could be a big one. Load firefox, take time
with stopwatch. Close firefox. Disable swap. Load firefox again.
Faster! This isn’t surprising with any application because the second
time loaded the filesystem drivers are caching the files for you in RAM
which is several orders of magnitude faster than your hard drive from
when the files original came. As a result a subsequent load will always
be faster. Also there are other considerations on a non-benchmarking
box, especially in the GUI. Jobs could be started/stopped in the
background taking up cycles. Anyway I don’t know of any great packages
for what you are trying to do but at the very least Google the topic and
see what you can find. Also statistically speaking there is a lot of
work to find a relevant statistic that is both significant and valid.
usually thirty tests need to be run to get an adequate sample size,
though that number can vary. Some algorithms need to be run on the
completed data to be sure they are “significant” meaning they were not
just anomalous. This isn’t a stats course, or a stats forum, but I’d
start with a benchmarking suite and go from there. If nothing else run
the tests in various orders a couple dozen times each. Sorry I can’t be
more help.
Good luck.
algarues wrote:
> Thanks for your answers
> what I am having a look at is
> web browsing with firefox, launching time for various applications such
> as openoffice, skype, amarok, gimp, playing halo in wine.
> I am using a computer with a core2duo processor at 2 GHz, SATA HD,
> nvidia 7300 GT graphic card and 2 GB of ram.
> Is there any benchmark that you can suggest which would give me some
> more “quantitative” answers?
> Thanks a lot again
>
> Catarano
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJCHKT3s42bA80+9kRAs/nAJ91RW3deiB3OfRFsL3WbRUnrP/yCgCfbt4x
/9j7RgmHYNL/96lslK+aGGg=
=8JSB
-----END PGP SIGNATURE-----
I totally agree with most of you, that maybe depending on when the swap is turned off, what I am seeing is relatively “illusory”.
That is why I would like to have a way to diasble it from startup and have some applications that would give me some readout that I could use.
I know it is a completely different operative system, but in the old days I used a mac and in OS9 it was possible to choose the size of virtual memory (swap) and switch it on and off at will.
Some applications benefited from having it enabled and large in size, some other (especially games or audio / video intensive) would suffer from having it enabled while running, independently of its size.
Thanks to everyone anyway, i will try the commenting out in fstab.