Size of swap file
- francois
- Contributor
- Posts: 6500
- 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
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.
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.
-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: Size of swap file
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.
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.
- francois
- Contributor
- Posts: 6500
- 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
Thanks for that prompt reply Donald. Here is the output:
I will try to double up the swap file, and report.
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:~#
Prendre son temps, profiter de celui qui passe.
-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: Size of swap file
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.
and your swap is free
As long as your swap isn't used, you have enough ram.
open up some programs and check again.
- francois
- Contributor
- Posts: 6500
- 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
I change the swap size. But during intense usage, booting google chrome and libreoffice same time, I get:
swap does not seem necessary. Is it?
Maybe the conclusion is that this old laptop of mine is simply slow?
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:~#
Maybe the conclusion is that this old laptop of mine is simply slow?
Prendre son temps, profiter de celui qui passe.
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Size of swap file
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.
- wread
- Module Guard
- Posts: 1257
- Joined: 09 Jan 2011, 18:48
- Distribution: Porteus v5.0-kde-64 bits
- Location: Santo Domingo
- Contact:
Re: Size of swap file
@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!
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!
The Porteus Community never sleeps!
- francois
- Contributor
- Posts: 6500
- 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
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):
However, the loading is really fast now. What do I conclude^
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:~#
Prendre son temps, profiter de celui qui passe.
-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: Size of swap file
@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
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
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Size of swap file
@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:
b) please boot with changes, start libreoffice and chrome then run:
please upload both files to pastebin.com so we can have a look.
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
Code: Select all
top -n1 -b > /tmp/processes-with-changes.txt
Please add [Solved] to your thread title if the solution was found.
- francois
- Contributor
- Posts: 6500
- 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
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.
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Size of swap file
whoops... - looks like i have stripped too much 
please install full 'ncurses' package and check if that helps.
thanks

please install full 'ncurses' package and check if that helps.
thanks
Please add [Solved] to your thread title if the solution was found.
- Obosan
- Samurai
- Posts: 114
- Joined: 28 Mar 2014, 17:02
- Distribution: Porteus v5.01 MATE
- Location: JAPAN
Re: Size of swap file
Bonsoir francois!francois wrote: Should I use a graphic indicator different than CPU graph?

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.

Amicalement.

- francois
- Contributor
- Posts: 6500
- 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
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: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.
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.
- francois
- Contributor
- Posts: 6500
- 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
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::
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
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.