system freeze when the RAM is full
system freeze when the RAM is full
I'm using Upup Precise 3.8.2 booting from an USB pendrive since last year.
Recently i am getting frequent freezes during internet browsing.
I guess the cause is my browser (Firefox) requesting too much RAM:
it usually happens while buffering HD flash videos or when i have many tabs opened. The GUI became very unresponsive and sometimes i can't even kill the X server with Ctrl+Alt+Backspace (i can only reboot the machine and lose all the unsaved data...).
Recently i am getting frequent freezes during internet browsing.
I guess the cause is my browser (Firefox) requesting too much RAM:
it usually happens while buffering HD flash videos or when i have many tabs opened. The GUI became very unresponsive and sometimes i can't even kill the X server with Ctrl+Alt+Backspace (i can only reboot the machine and lose all the unsaved data...).
- OscarTalks
- Posts: 2196
- Joined: Mon 06 Feb 2012, 00:58
- Location: London, England
Maybe you could try a swap file.
If it has to be a case of everything within the flash drive this is far from ideal, but you have little choice.
Memory is one of those essential components needed to perform a task.
When you run out, the system can only freeze or crash.
If you can find a way of restricting the application's access to the memory the problem is that you still will not have enough memory for the task.
Otherwise, add more RAM to the machine.
If it has to be a case of everything within the flash drive this is far from ideal, but you have little choice.
Memory is one of those essential components needed to perform a task.
When you run out, the system can only freeze or crash.
If you can find a way of restricting the application's access to the memory the problem is that you still will not have enough memory for the task.
Otherwise, add more RAM to the machine.
Oscar in England
- Packetteer
- Posts: 73
- Joined: Sat 12 May 2012, 19:33
- Location: Long Island Ny
Hi eadmaster
You need to change your profile in FireFox to save its cash in a temp
directory. I have SeaMonkey save its cash to a temp directory so my save file
stays small. Yes the temp directory is held in ram and yes after many hours
of surfing the net I also run out of Ram.
Slacko 5.7 has a nice feature. When Slacko 5.7 runs low on ram a popup
warning message is displayed which alerts me to the fact I need to close all
applications and then gracefully shut down the machine. Which since it is a
graceful shut down I lose nothing.
As I said I changed my profile in SeaMonkey so SeaMonkey saves its cash to
a temp file (/tmp). /tmp is in ram. In your case you could setup FireFox to
save its cash to your hard drive thus avoiding using ram for FIreFox's cash.
I use /temp because I try to avoid having my hard drive mounted as much as
possible especially while surfing the web. I do this for security reasons.
Best Regards
John
You need to change your profile in FireFox to save its cash in a temp
directory. I have SeaMonkey save its cash to a temp directory so my save file
stays small. Yes the temp directory is held in ram and yes after many hours
of surfing the net I also run out of Ram.
Slacko 5.7 has a nice feature. When Slacko 5.7 runs low on ram a popup
warning message is displayed which alerts me to the fact I need to close all
applications and then gracefully shut down the machine. Which since it is a
graceful shut down I lose nothing.
As I said I changed my profile in SeaMonkey so SeaMonkey saves its cash to
a temp file (/tmp). /tmp is in ram. In your case you could setup FireFox to
save its cash to your hard drive thus avoiding using ram for FIreFox's cash.
I use /temp because I try to avoid having my hard drive mounted as much as
possible especially while surfing the web. I do this for security reasons.
Best Regards
John
- neerajkolte
- Posts: 516
- Joined: Mon 10 Feb 2014, 07:05
- Location: Pune, India.
Hi I do not use upup.
I use fatdog64. In fatdog you can split your humongous initrd in small initrd and base.sfs then choose not to load base.sfs and savefile in ram by giving some boot options. It uses them directly from disc.
I am at work now and don't remember the boot options.
But if same is available you might save some ram by sacrificing some speed.
Then again I am just a new noob. I might be wrong.
- Neeraj.
I use fatdog64. In fatdog you can split your humongous initrd in small initrd and base.sfs then choose not to load base.sfs and savefile in ram by giving some boot options. It uses them directly from disc.
I am at work now and don't remember the boot options.
But if same is available you might save some ram by sacrificing some speed.
Then again I am just a new noob. I might be wrong.
- Neeraj.
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson
“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.â€
- Amara’s Law.
- Ken Thompson
“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.â€
- Amara’s Law.
I'm using Slacko56npae frugal on a laptop, and on a USB for use on other computers. The built in Firefox is version 17.0.8 and I have reduced the cache requirement to 15Mb (Edit/preferences/Advanced/Override Automatic cache requirement).
Firefox seems to work fine with this reduction.
Firefox seems to work fine with this reduction.
--- quad booting Slacko57NPAE, Slacko56NPAE, Slacko55PAE (with OO4, devx, Gimp) & WXP on DELL Dimension 2400 PC & DELL Latitude 630 Laptop using grub.
---USB-Flash booting same on Samsung N110 WXP Netbook and Lenovo q100 WXP netPC.
---USB-Flash booting same on Samsung N110 WXP Netbook and Lenovo q100 WXP netPC.
Firefox works perfectly with 0MB cache...done it for years since I don't have dial up which seems to be the only valid reason to have cache at all.
The urlclassifier files also get big. Beyond that you have to try and tame the sqlite files but their defaults are big now for no goot technical reason....all the info is easily searchable either here or on the net.
mike
The urlclassifier files also get big. Beyond that you have to try and tame the sqlite files but their defaults are big now for no goot technical reason....all the info is easily searchable either here or on the net.
mike
Thank you for your suggestions, these are my internal firefox settings:
Also i guess i need to reduce the Flash cache separately..
My persistent data image is 700MB big, so avoiding full RAM loading would help greatly, but I could not find such an option in this page.
Btw there is an option "pfix=nocopy" to keep the main SFS on disk, which now i've set.
Side question: do extra SFSes are also entirely loaded in RAM by default?
Code: Select all
browser.cache.disk.enable;false
browser.cache.memory.enable;true
browser.sessionhistory.max_total_viewers;0
network.prefetch-next;false
browser.cache.use_new_backend;0
browser.cache.memory.capacity;0
My persistent data image is 700MB big, so avoiding full RAM loading would help greatly, but I could not find such an option in this page.
Btw there is an option "pfix=nocopy" to keep the main SFS on disk, which now i've set.
Side question: do extra SFSes are also entirely loaded in RAM by default?
If you are booting from USB flash then creating or using a swap file on it could be a bad idea as this kind of media is less tolerant of many write cycles compared with traditional platter magnetic media.
Firefox has the facility to move the contents of the cache directory:
BTW I would disable memory caching for firefox but enable disk caching. That said, I would ensure that the caching parent directory is set to /tmp (which should be mounted as tmpfs). The max size of the cache I would set to a small percentage of system ram perhaps just one or two percent. Flash and more or less anything of that kind is also probably using the /tmp directory or a subdir to cache a video as it is playing. This may be more a reason why memory gets filled as videos tend to be larger than web pages.
I would check the output of the "mount" command, typed at in a terminal window without parameters it should say how /tmp is mounted. (see also the file /proc/mounts).
On my system /tmp is mounted as tmpfs
My own preference is for /tmp to be mounted as tmpfs with a fixed size. At least anything writing to it will run out of space sooner than run out of memory.
For me
sets my /tmp tmpfs to fixed size 250 Megabytes (as an example) so should be enough for most videos. Of course you will need enough memory for a tmpfs, a tmpfs can only use a certain amount of system ram as the rest will be needed by the kernel and applications. tmpfs can also use swap (if available) however swap will likely use a fair number of write cycles.
Firefox has the facility to move the contents of the cache directory:
Code: Select all
about:config
browser.cache.disk.parent_directory
I would check the output of the "mount" command, typed at in a terminal window without parameters it should say how /tmp is mounted. (see also the file /proc/mounts).
On my system /tmp is mounted as tmpfs
Code: Select all
mount -t tmpfs -o size=250m tmpfs /tmp
My own preference is for /tmp to be mounted as tmpfs with a fixed size. At least anything writing to it will run out of space sooner than run out of memory.
For me
Code: Select all
mount /tmp -o remount,size=250m
My PC has a 4GB memory stick. I'm planning to get another 4GB memory stick, but not now...
Also i will need to switch to a PAE-enabled Puppy build to make use of all the memory (i'd like to avoid 64-bit build because they take twice space for the runtime libraries).
Btw there is no internal had disk. When needed i connect an external hard disk (a Samsung FreeAgent Goflex) via an hacked SATA cable, but i don't want to do that just for the swap partition...
After adding the "pfix=nocopy" command now I have 1.1GB of memory free according to the "free" command.
Do you suggest me to unload some unnecessary SFS files to free up more or it won't change anything?
According to mount, the /tmp partition is like this:
I dont know if "size=1553964k" means it is already limited. If it does not, where i should put the remount command in order to not break anything at boot time?
As suggested i will now try disabling the FF memory cache and switch to disk caching and see what happens...
Also i will need to switch to a PAE-enabled Puppy build to make use of all the memory (i'd like to avoid 64-bit build because they take twice space for the runtime libraries).
Btw there is no internal had disk. When needed i connect an external hard disk (a Samsung FreeAgent Goflex) via an hacked SATA cable, but i don't want to do that just for the swap partition...
After adding the "pfix=nocopy" command now I have 1.1GB of memory free according to the "free" command.
Do you suggest me to unload some unnecessary SFS files to free up more or it won't change anything?
According to mount, the /tmp partition is like this:
Code: Select all
tmpfs on /initrd/pup_rw type tmpfs (rw,relatime,size=1553964k)
As suggested i will now try disabling the FF memory cache and switch to disk caching and see what happens...
Yep i knew that, but for the moment i would like to stay with this build. I am going to switch to TahrPup as soon as they get the AMD drivers working...p310don wrote:Couple of thoughts...
If your PC has 4 gig, but you're not using PAE or 64bit, you've probably only got 3ish gig to play with. So PAE or 64bit is possibly your solution on its own.
While we are on topic, since i have no discrete graphics card, do the shared graphics memory is allocated inside or outside the system-accessible area?
Can i customize the amount of memory that is reserved for the GPU? (i am currently using the "amd_fglrx_catalyst-13.1-k3.8.2-upup" drivers)
I would like to avoid using a second pendrive for the swap for the same reason Peterm321 told before (limited write cycles).
Interesting. My own computer has a similar entries for initrd tmpfs (as I have a frugal install) and I had not amended these to limit the amount of ram. (I am just now amending my startup scripts to put a limit on the initrd tmpfs as well)eadmaster Today, at 00:35 wrote:
According to mount, the /tmp partition is like this:Code: Select all
tmpfs on /initrd/pup_rw type tmpfs (rw,relatime,size=1553964k)
However I have for nearly as long as I have used upup Raring explicitly mounted and limited the /tmp directory. Unless your /proc/mounts file shows a specific reference that begins with /tmp e,g
/tmp tmpfs (rw, ...... size=NNNNNNk)
Then it does not appear that /tmp has been specifically mounted. By the way, the 1553964k refers to
1,553,964 Kilobytes or in other words circa 1.5 Gigabytes of memory. Playing long videos could possibly fill this up, thats a lot of video though unless its HD you are using.
Maybe limit it by half and see if there is any benefit?
Code: Select all
mount /initrd/pup_rw -o remount,size=750m
On another point I have a radeon card but use the open source driver that is bundled with Raring rather than the fglrx driver. That said I'm not using Puppy to play 3D games.
I have had some issues in the past, relating to kernel panics in the drm_kms_helper module, this module appears to be sensitive to the system running out of memory. The open source driver (so I would hope the proprietary driver), has tunables in the file:
/etc/modprobe.d/radeon.conf
The tunables include the gartsize (the memory used by the graphics chip). See also the kernel variable in the folder
/sys/module/radeon/parameters/
Originally 128 Mbytes, I set the gartsize to 32 (32 = 32 megabytes). It doesnt appear to affect the ability to play DVDs and MP4s so it may be worth seeing if you can set the gartsize and if so set it to 32 without adverse effect. If I rightly recall there is also an "option gartsize" that can be inserted into xorg.conf though I have rather set it in radeon.conf.