Page 1 of 1
Size of swap file
Posted: 21 May 2014, 22:33
by francois
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.
Re: Size of swap file
Posted: 21 May 2014, 22:58
by donald
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.
Re: Size of swap file
Posted: 21 May 2014, 23:14
by francois
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.
Re: Size of swap file
Posted: 21 May 2014, 23:19
by donald
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.
Re: Size of swap file
Posted: 22 May 2014, 02:15
by francois
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?
Re: Size of swap file
Posted: 22 May 2014, 08:47
by fanthom
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?).
Re: Size of swap file
Posted: 23 May 2014, 11:56
by wread
@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!
Re: Size of swap file
Posted: 24 May 2014, 15:40
by francois
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^
Re: Size of swap file
Posted: 24 May 2014, 18:15
by donald
@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
Re: Size of swap file
Posted: 24 May 2014, 19:13
by fanthom
@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.
Re: Size of swap file
Posted: 24 May 2014, 21:54
by francois
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:~#
Re: Size of swap file
Posted: 24 May 2014, 23:37
by fanthom
whoops... - looks like i have stripped too much
please install full 'ncurses' package and check if that helps.
thanks
Re: Size of swap file
Posted: 26 May 2014, 15:30
by Obosan
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.
So this may be not correct.
Amicalement.
Re: Size of swap file
Posted: 20 Jan 2015, 11:06
by francois
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:~#
Re: Size of swap file
Posted: 04 Mar 2015, 22:41
by francois
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