WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: out of memory - ramzswap  (Read 3143 times)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1217
out of memory - ramzswap
« on: January 20, 2011, 12:12:48 PM »
When I watch a large flash video in opera my memory gets often very low.
When this happens I often experience lock-ups and have to reboot my pc.
Could it be that ramzswap is not actually being limited properly to 90% ?

What happens when you run out of memory?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10963
Re: out of memory - ramzswap
« Reply #1 on: January 20, 2011, 12:25:11 PM »
If you have no swap, you will crash when out of memory, it's a law of nature.

Many flash vids are downloaded to /tmp or the browser cache. If your tmpfs (not ramzswap) is filling up to its limit of 90%, that alone won't cause crashes, but if your apps are taking 10% or more...
The only barriers that can stop you are the ones you create yourself.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1217
Re: out of memory - ramzswap
« Reply #2 on: January 20, 2011, 12:59:05 PM »
I think I completely misunderstood the role of ramzswap.
It seems that good old opera9 has been leaking a lot recently, pushing my app's memory usage to just over 10%.

So if I boot with base norestore and cp a file to tmpfs which is bigger than my RAM tmpfs the system should stay usable, right?

Offline hiro

  • Hero Member
  • *****
  • Posts: 1217
Re: out of memory - ramzswap
« Reply #3 on: January 20, 2011, 01:11:27 PM »
Is ramzswap only used for swap?

I also found this line in the rc Script, it doesn't seem to fit with that 90/10 ratio:
Code: [Select]
rzscontrol /dev/ramzswap0 --init # Defaults to max 25% of ram.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: out of memory - ramzswap
« Reply #4 on: January 20, 2011, 11:29:09 PM »
What happens when you run out of memory?

FWIW - running TC 2.10 without ramzswap - I have noted oom-killer doing its job on several occasions and killing opera or operapluginwrapper, which should be the ideal case.

Perhaps you could specify how much total RAM you have installed and how big the videos you refer to are approximately.

BTW, data residing in tmpfs can be swapped out.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10963
Re: out of memory - ramzswap
« Reply #5 on: January 21, 2011, 05:05:24 AM »
Ramzswap helps, but it's not a miracle maker. With it you can use slightly more memory than you really have.

Quote
So if I boot with base norestore and cp a file to tmpfs which is bigger than my RAM tmpfs the system should stay usable, right?

Yes. The file won't get there fully, but it'll fill as much of the root tmpfs as it can. It doesn't even have to be a real file, you can just write zeroes to test it:



It's true that in the ideal conditions the OOM killer would take out the app using the most ram. But often it can't do its job, or even get started; this is when there's a more complete lockup.
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: out of memory - ramzswap
« Reply #6 on: January 21, 2011, 10:26:26 AM »
A documented way to attempt to invoke oom-killer manually would be Alt+SysRq+f (with a QWERTY keyboard - not that I ever would have tried that myself so far.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1217
Re: out of memory - ramzswap
« Reply #7 on: January 21, 2011, 11:09:14 AM »
Thanks, I now think I partly understand the lockup.
I actually tried the dd yesterday and had been wondering why dd was just getting killed while opera/Flash wouldn't - probably resulting in a lockup.
From what I read now the reason seems to be that opera sometimes can't be killed (either not fast enough or not at all), because of some other bug I assume...