Understanding swap partitions - SOLVED!

Booting, installing, newbie
Message
Author
jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#16 Post by jpeps »

After testing it to the max...the memory restart restored the CPU functioning. Not having to reboot the OS is all I care about. To get a freeze wasn't easy...25 tabs, several videos..over an hour of u tubes. That's about all I can ask for on an old dell with 1gig RAM. (the main issue has always been CPU...and is more related to flash than FF).

edit: right now I'm running 70 java jars and FF with 10 tabs, and had no problem running a utube video despite a long load time. Another tab opened right up for writing this response....nothing bogging down. All because of swap..176M being used. Remember the myth about java using too much ram?

Next, I turned off my swap file, ran about 20 jars and tried to load FF. FF wouldn't load, and the computer froze, requiring a reboot. That should quell the swap dispute. It's all about ram management, which the kernel handles very well if you give it the right tools.

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#17 Post by RetroTechGuy »

jpeps wrote:After testing it to the max...the memory restart restored the CPU functioning. Not having to reboot the OS is all I care about. To get a freeze wasn't easy...25 tabs, several videos..over an hour of u tubes. That's about all I can ask for on an old dell with 1gig RAM. (the main issue has always been CPU...and is more related to flash than FF).

edit: right now I'm running 70 java jars and FF with 10 tabs, and had no problem running a utube video despite a long load time. Another tab opened right up for writing this response....nothing bogging down. All because of swap..176M being used. Remember the myth about java using too much ram?

Next, I turned off my swap file, ran about 20 jars and tried to load FF. FF wouldn't load, and the computer froze, requiring a reboot. That should quell the swap dispute. It's all about ram management, which the kernel handles very well if you give it the right tools.
I've noticed that when FF (or some accessory for FF) eats the majority of the RAM, that Youtube videos will no longer play. It will display the Youtube page, but just a black box where the video goes.

A RAM purge (using the script references earlier), a refresh of the screen will restore playing.

No, I haven't had FF crash the OS yet. I have had it bog things down to the point where I thought I might have to crash it to get out... Once in a great while, I've had trouble opening a terminal in order to run my script.

Typically I can get just purge the RAM, and close FF gracefully.

Oh, regarding swap... I have a 1.2 GB swap on this machine. It doesn't very often dig into the swap -- it seems that FF only likes RAM...I don't see it overflowing into the swap partition.
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#18 Post by jpeps »

RetroTechGuy wrote:
A RAM purge (using the script references earlier), a refresh of the screen will restore playing.

No, I haven't had FF crash the OS yet. I have had it bog things down to the point where I thought I might have to crash it to get out... Once in a great while, I've had trouble opening a terminal in order to run my script.

Typically I can get just purge the RAM, and close FF gracefully.

The script purges the cache

Code: Select all

Mem: 676196K used, 358316K free, 0K shrd, 74116K buff, 288476K cached
Mem: 341576K used, 692936K free, 0K shrd, 3800K buff, 65044K cached
However, the computer remains just as bogged down, given the CPU usage is still too high (100%). In fact it's 10% higher than before I cleared the cache:

Code: Select all


18833  6729 root     R     619m  61%   0 100% /mnt/sda2/firefox/firefox

Now, if I hit the memory restart button, watch what happens :

Code: Select all


18833  6729 root     S     444m  44%   0   5% /mnt/sda2/firefox/firefox
Now, everything is running smoothly again.
Oh, regarding swap... I have a 1.2 GB swap on this machine. It doesn't very often dig into the swap -- it seems that FF only likes RAM...I don't see it overflowing into the swap partition.

I've notice that also. FF does it's own thing (i.e, wants all your active RAM). As noted above, however, swap will provide the RAM you need by getting it somewhere else.

I suspect there could also be some downsides to clearing the general cache vs just handling FF.

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#19 Post by RetroTechGuy »

Weird, jpeps...

On my system, I just ran it:

Code: Select all

Initial free space
              total         used         free       shared      buffers
  Mem:       969868       821240       148628            0        30472
 Swap:      1228964         2388      1226576
Total:      2198832       823628      1375204

clearing cache

Final free space
              total         used         free       shared      buffers
  Mem:       969868       461860       508008            0         1080
 Swap:      1228964         2388      1226576
Total:      2198832       464248      1734584
At the moment, I do have FF and Thunderbird open. But it does a similar response with just FF running.
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#20 Post by jpeps »

Yes, similar to what I posted. Looks like you're using some swap as well. Check out info for the browser though, which includes CPU usage. I think the kernel will take what it needs from the cache anyway, so probably it's unnecessary to clean it ? It certainly doesn't restore resources the way restarting the browser does.

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#21 Post by RetroTechGuy »

jpeps wrote:Yes, similar to what I posted. Looks like you're using some swap as well. Check out info for the browser though, which includes CPU usage. I think the kernel will take what it needs from the cache anyway, so probably it's unnecessary to clean it ? It certainly doesn't restore resources the way restarting the browser does.
Mine doesn't seem to pound the CPU too badly, it just gobbles RAM... Here is top, sorted for memory:

Code: Select all

26730  5756 root     S     436m  46%   0   6% firefox
 5648  5647 root     S <   158m  17%   0   2% X :0 -br -nolisten tcp
28126 26730 root     R    85236   9%   0  11% /initrd/pup_ro4/opt/firefox-16.0.2/plugin-container /usr/
 5756     1 root     S    40380   4%   0   0% /usr/local/apps/ROX-Filer/ROX-Filer -p /root/Choices/ROX-
27396  5756 root     S    30648   3%   0   0% geany
10604  5756 root     S    29680   3%   0   0% roxterm
 6458     1 root     S    18352   2%   0   0% fbpanel
I just ran my cache cleaner

Code: Select all

 Initial free space
              total         used         free       shared      buffers
  Mem:       969868       757472       212396            0        60548
 Swap:      1228964         2780      1226184
Total:      2198832       760252      1438580

 clearing cache

 Final free space
              total         used         free       shared      buffers
  Mem:       969868       310924       658944            0          576
 Swap:      1228964         2780      1226184
Total:      2198832       313704      1885128
Top still shows it simmering at about 448MB RAM . Apparently "free" and "top" compute memory differently...
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#22 Post by jpeps »

You can get rid of the plugin container.

Mine doesn't seem to pound the CPU too badly, it just gobbles RAM... Here is top, sorted for memory:
I loaded it up for testing. Restart clears it (also gives back additional ram beyond clearing the cache). You might have a more powerful CPU.

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#23 Post by RetroTechGuy »

jpeps wrote:You can get rid of the plugin container.

Mine doesn't seem to pound the CPU too badly, it just gobbles RAM... Here is top, sorted for memory:
I loaded it up for testing. Restart clears it (also gives back additional ram beyond clearing the cache). You might have a more powerful CPU.
Yeah, I'm running an Athlon 2200. But when the RAM gets full, she's "toast"...
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#24 Post by jpeps »

RetroTechGuy wrote:
Yeah, I'm running an Athlon 2200. But when the RAM gets full, she's "toast"...
Nothing any of us will need to worry about for much longer. A cheap replacement for my Dell Inspiron costs $399, retail. It's available only with 64 bit, and comes with a minimum of 4 gigs SDRAM with a 500 gig hard drive. This is just a basic starter machine for doing your homework on before you have a real job.

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#25 Post by rjbrewer »

RetroTechGuy wrote:
jpeps wrote:You can get rid of the plugin container.

Mine doesn't seem to pound the CPU too badly, it just gobbles RAM... Here is top, sorted for memory:
I loaded it up for testing. Restart clears it (also gives back additional ram beyond clearing the cache). You might have a more powerful CPU.
Yeah, I'm running an Athlon 2200. But when the RAM gets full, she's "toast"...
Running a pc with Athlon 2200, 1Gb ram, youtube vids crash every time with or without swap.

My old Inspiron 700m (1.6Ghz) 1Gb ram, runs great;
no swap needed.

I use Htop to watch ram and cpu usage.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#26 Post by jpeps »

rjbrewer wrote:
Running a pc with Athlon 2200, 1Gb ram, youtube vids crash every time with or without swap.

My old Inspiron 700m (1.6Ghz) 1Gb ram, runs great;
no swap needed.
For how long?

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#27 Post by rjbrewer »

jpeps wrote:
rjbrewer wrote:
Running a pc with Athlon 2200, 1Gb ram, youtube vids crash every time with or without swap.

My old Inspiron 700m (1.6Ghz) 1Gb ram, runs great;
no swap needed.
For how long?
I use full installs.
700m has been running 3+ days.
Using Wary5.3, Seamonkey 2.61
It does not accumulate ram use over time.
Running streaming Youtube video, a video file, radio stream
and murga forum at same time, ram use is under 400mb
according to htop.
Cpu can max to 100% without slowing the vids or
overheating.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#28 Post by jpeps »

rjbrewer wrote: 700m has been running 3+ days.
Using Wary5.3, Seamonkey 2.61
It does not accumulate ram use over time.
Running streaming Youtube video, a video file, radio stream
and murga forum at same time, ram use is under 400mb
according to htop.
Cpu can max to 100% without slowing the vids or
overheating.
Well, if you're up to 400mb and 100% CPU usage, there's not much more your computer can handle. Try some tests like opening about 20 tabs, or running some programs like Open Office (above, I ran 70 instances of java jars to watch swap management). UTubes are pretty user friendly. I test with some Vanguard webcasts that tend to stall midway through without the right setup.

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#29 Post by RetroTechGuy »

jpeps wrote:You can get rid of the plugin container.
BTW, I missed this. What does that mean?

I'm running FF as a .sfs (which helped my frugal save file space a lot).
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#30 Post by RetroTechGuy »

rjbrewer wrote:
RetroTechGuy wrote: Yeah, I'm running an Athlon 2200. But when the RAM gets full, she's "toast"...
Running a pc with Athlon 2200, 1Gb ram, youtube vids crash every time with or without swap.

My old Inspiron 700m (1.6Ghz) 1Gb ram, runs great;
no swap needed.

I use Htop to watch ram and cpu usage.
Is it possible that you have a bad RAM stick? Perhaps when FF (and Youtube) try to consume all your memory, you hit the bad spot and it pukes. Otherwise you don't run into it...
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#31 Post by jpeps »

RetroTechGuy wrote:
jpeps wrote:You can get rid of the plugin container.
BTW, I missed this. What does that mean?

I'm running FF as a .sfs (which helped my frugal save file space a lot).
Go into about:config, search for "ipc" and disable the plugins. They're resource hogs. I'm guessing the SFS saves your settings in the .mozilla folder. I run a hard copy from my HD with a /root link

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#32 Post by RetroTechGuy »

jpeps wrote:
RetroTechGuy wrote:
jpeps wrote:You can get rid of the plugin container.
BTW, I missed this. What does that mean?

I'm running FF as a .sfs (which helped my frugal save file space a lot).
Go into about:config, search for "ipc" and disable the plugins. They're resource hogs. I'm guessing the SFS saves your settings in the .mozilla folder. I run a hard copy from my HD with a /root link
Thanks, I just turned them off. We'll see if that helps.

Yes, the SFS still saves junk in .mozilla, but it doesn't store the FF code in the save file (first time I'd had 3 green bars in a long time) -- and I also moved that out into /root/home/puppy528/ (where I store all my 5.28 junk).

I run all frugals -- and just recently got around to dumping all of the 4.31 saves, and the 5.20 saves...
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

Post Reply