Size of swap file

Here you can post about your various experiences with PC hardware. You can also post about hardware that is not compatible with the linux kernel or not recommended for use with Porteus.
User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Size of swap file

Post#1 by francois » 21 May 2014, 22:33

My xfce installation seem to get very slow at times.

Specifications:
http://www.msimobile.com/level3_product ... d=4&id=168

I have a stick of 2 gig of memory among other specifications. The linux swap file is of 1 gig.

Manifestations:
Google chrome takes a lot of time to open when many tabs were opened the preceeding session.
Opening libreoffice seems to use all the ressources according to CPU graph.

Will porteus find the swap partition on its own?
Is this enough swap file?
Should I use a graphic indicator different than CPU graph?

Thanks.
Last edited by francois on 21 May 2014, 23:12, edited 1 time in total.
Prendre son temps, profiter de celui qui passe.

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: Size of swap file

Post#2 by donald » 21 May 2014, 22:58

Hi francois
By default, Porteus searches your attached drives for
partitions that are formatted as swap, and will mount them
for use within Porteus. The 'noswap' cheatcode disables
this behaviour.

Try free -m to check how much ram / swap is being used / free.
Last edited by donald on 21 May 2014, 23:14, edited 1 time in total.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Size of swap file

Post#3 by francois » 21 May 2014, 23:14

Thanks for that prompt reply Donald. Here is the output:

Code: Select all

root@porteus:~#  free -m
             total       used       free     shared    buffers     cached
Mem:          1988       1367        620          0        104        698
-/+ buffers/cache:        563       1424
Swap:         1074          0       1074
root@porteus:~# 
I will try to double up the swap file, and report.
Prendre son temps, profiter de celui qui passe.

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: Size of swap file

Post#4 by donald » 21 May 2014, 23:19

Look at the - buffers line, currently 563mb ram are used
and your swap is free
As long as your swap isn't used, you have enough ram.
open up some programs and check again.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Size of swap file

Post#5 by francois » 22 May 2014, 02:15

I change the swap size. But during intense usage, booting google chrome and libreoffice same time, I get:

Code: Select all

root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988       1096        892          0        100        625
-/+ buffers/cache:        370       1618
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988       1185        802          0        100        613
-/+ buffers/cache:        471       1516
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988       1074        913          0        100        625
-/+ buffers/cache:        348       1639
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988       1087        900          0        100        623
-/+ buffers/cache:        363       1624
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988       1105        883          0        100        623
-/+ buffers/cache:        381       1606
Swap:        10199          0      10199
root@porteus:~# tmp
bash: tmp: command not found
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988       1108        880          0        104        646
-/+ buffers/cache:        356       1631
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988       1171        816          0        112        685
-/+ buffers/cache:        373       1614
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988       1228        759          0        120        722
-/+ buffers/cache:        384       1603
Swap:        10199          0      10199
root@porteus:~# 
swap does not seem necessary. Is it?
Maybe the conclusion is that this old laptop of mine is simply slow?
Prendre son temps, profiter de celui qui passe.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Size of swap file

Post#6 by fanthom » 22 May 2014, 08:47

pleas boot to 'Always Fresh' mode and check if that helps. if yes then something in your changes is slowing down the system (extra processes started? chrome cache files?).
Please add [Solved] to your thread title if the solution was found.

User avatar
wread
Module Guard
Module Guard
Posts: 1255
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v5.0-kde-64 bits
Location: Santo Domingo
Contact:

Re: Size of swap file

Post#7 by wread » 23 May 2014, 11:56

@francois

if it is an old laptop, it should be 32-bits one. In that case all swap over 4 Gig total is unnecessary, then the system cannot address it.

Regards!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Size of swap file

Post#8 by francois » 24 May 2014, 15:40

I am on a 32 bit computer. Do I have to reset swap to 4 gig?

With always fresh option swap does not seemed to be used. It seems unecessary (once more I am starting libreoffice writer and firefox with many tabs opened):

Code: Select all

root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988        800       1188          0         90        469
-/+ buffers/cache:        241       1747
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988        905       1083          0        109        555
-/+ buffers/cache:        240       1748
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988        966       1022          0        119        624
-/+ buffers/cache:        222       1766
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988        995        993          0        119        624
-/+ buffers/cache:        250       1737
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988        985       1002          0        119        619
-/+ buffers/cache:        246       1741
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988        926       1061          0        120        623
-/+ buffers/cache:        182       1806
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988        927       1061          0        120        624
-/+ buffers/cache:        182       1806
Swap:        10199          0      10199
root@porteus:~# free -m
             total       used       free     shared    buffers     cached
Mem:          1988       1007        981          0        120        624
-/+ buffers/cache:        262       1726
Swap:        10199          0      10199
root@porteus:~# 
However, the loading is really fast now. What do I conclude^
Prendre son temps, profiter de celui qui passe.

donald
Full of knowledge
Full of knowledge
Posts: 2063
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: Size of swap file

Post#9 by donald » 24 May 2014, 18:15

@francois
As far as I can see your swap isn't used, means you have enough RAM.
Also it doesn't hurt to have a swap, give it ~2GB
--fast<->slow--
I can't say more than fanthom already did 2 posts above.
regards

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Size of swap file

Post#10 by fanthom » 24 May 2014, 19:13

@francois
so if in 'Always Fresh' porteus works fast then it must be something in changes. are the changes placed on different (and slower) storage than the main system?
you have 2 GB of RAM which should be enough to handle your system (depending how many modules you have) so maybe you could try 'copy2ram + changes' combination?

a) please boot without changes, start libreoffice and chrome then run:

Code: Select all

top -n1 -b > /tmp/processes-no-changes.txt
b) please boot with changes, start libreoffice and chrome then run:

Code: Select all

top -n1 -b > /tmp/processes-with-changes.txt
please upload both files to pastebin.com so we can have a look.
Please add [Solved] to your thread title if the solution was found.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Size of swap file

Post#11 by francois » 24 May 2014, 21:54

Maybe a small problem here, in cli mode always fresh, I get:

Code: Select all

root@porteus:~# top -n1 -b > /tmp/processes-no-changes.txt
'dumb': unknown terminal type.
root@porteus:~#
Prendre son temps, profiter de celui qui passe.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Size of swap file

Post#12 by fanthom » 24 May 2014, 23:37

whoops... - looks like i have stripped too much :)
please install full 'ncurses' package and check if that helps.

thanks
Please add [Solved] to your thread title if the solution was found.

User avatar
Obosan
Samurai
Samurai
Posts: 114
Joined: 28 Mar 2014, 17:02
Distribution: Porteus v5.01 MATE
Location: JAPAN

Re: Size of swap file

Post#13 by Obosan » 26 May 2014, 15:30

francois wrote: Should I use a graphic indicator different than CPU graph?
Bonsoir francois! :)
Following two plugins are applicable on xfce desktop environment based on my poor experience.
Plugins to the panel (Add new items)
CPU Graph
Graphical representation of the CPU load
System Load Monitor
Monitor CPU load, swap usage and memory footprint
System Load Monitor's property has options, therefore, you just can put swap usage
monitor beside CPU graph if you want.

Other than these, I used Menu > Accessories > Task Manager keeping it on the panel.
When you float your mouse on Task Manager Icon, you'll see Processes/CPU/Memory/Swap.
I hope you'll get all information you need with the trick.

For permanent use, one could setup as follows:
Menu > Settings > Session and Startup > Application Autostart >
+Add > xfce4-taskmanager
You know, francois, this is just what I learned by doing. :D So this may be not correct.
Amicalement. :wink:

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Size of swap file

Post#14 by francois » 20 Jan 2015, 11:06

donald wrote:Hi francois
By default, Porteus searches your attached drives for
partitions that are formatted as swap, and will mount them
for use within Porteus. The 'noswap' cheatcode disables
this behaviour.

Try free -m to check how much ram / swap is being used / free.
It took me some time to come back on this thread. Not only actually my system was slow, but at times almost frozen. It is worst with porteus 3.1 edition. I was not even able to get the hibernate function going:


Doubling the swap file did improve a lot the situation (more than doubled the memory):
root@porteus:~# free -m
total used free shared buffers cached
Mem: 1971 1795 176 0 109 694
-/+ buffers/cache: 991 980
Swap: 2085 0 2085
root@porteus:~#
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: Size of swap file

Post#15 by francois » 04 Mar 2015, 22:41

It seems that swapspace is even better than swapd:
http://pqxx.org/development/swapspace/
... Unlike similar programs such as dynswapd and the older (and more portable) swapd, Swapspace also adapts the sizes of the swap files it creates to meet demand...

According to your architecture download swapspace from debian:
https://packages.debian.org/squeeze/swapspace
A necessary dependency:
https://packages.debian.org/squeeze/lsb-base

And proceed to deb2xzm. Then start it in command line:

Code: Select all

swapspace
:

The disadvantage:
http://pqxx.org/development/swapspace/
When not to use it
In its current form, Swapspace is probably not a good choice for systems that need to remain responsive at all times
Prendre son temps, profiter de celui qui passe.

Post Reply