You are not logged in.

#1 2015-05-24 21:42:42

wil93
Member
From: Italy
Registered: 2013-09-15
Posts: 72

System excessively slow when there's no more memory available

For some reasons I have to keep my home folder on a tmpfs, this means that I have always about 2GB of RAM occupied. This does not play well with chromium: there's a limit of open tabs that, when crossed, causes all my system to become absurdly slow (just enough fast to realize that it's moving, and way too slow to close the tab I just dared to open).

I'd like it if chromium just showed the usual "Out of memory" error tab... instead, it seemingly tries to allocate the new tab (even if there's no more memory left). How can I avoid this situation? (apart from getting a swap file)

Offline

#2 2015-05-25 18:48:33

SirMyztiq
Member
Registered: 2015-03-24
Posts: 118

Re: System excessively slow when there's no more memory available

wil93 wrote:

For some reasons I have to keep my home folder on a tmpfs, this means that I have always about 2GB of RAM occupied. This does not play well with chromium: there's a limit of open tabs that, when crossed, causes all my system to become absurdly slow (just enough fast to realize that it's moving, and way too slow to close the tab I just dared to open).

I'd like it if chromium just showed the usual "Out of memory" error tab... instead, it seemingly tries to allocate the new tab (even if there's no more memory left). How can I avoid this situation? (apart from getting a swap file)

I'm not certain why it isn't populating the "its dead Jim" error if its running low on memory if it's low on resources...maybe because its tmpfs which is a portion of your memory?

You could write a script that would notify you if you're running out.

#!/bin/bash

#cutoff_frac is basically how much used memory can be at in terms of how much
#total memory you have...2 is 1/2 of 100% or an alert when you're using 50% mem, etc.
cutoff_frac=2

total_mem=$(free|awk '/^Mem:/{print $2}')
let "threshold = $total_mem / $cutoff_frac"

while :
do

    free_mem=$(free|awk '/^Mem:/{print $4}')

    if [ $free_mem -lt $threshold ]
        then
        notify-send "Low memory!!"
    fi

    sleep 5

done

exit

Offline

#3 2015-05-25 20:07:53

wil93
Member
From: Italy
Registered: 2013-09-15
Posts: 72

Re: System excessively slow when there's no more memory available

Thanks. The idea of chromium "not seeing" tmpfs's memory is nice, unfortunately I just tested with a different laptop and I get the same error.

I reported this as a chromium bug: https://code.google.com/p/chromium/issu … ?id=491959

Offline

#4 2015-05-26 00:52:19

SirMyztiq
Member
Registered: 2015-03-24
Posts: 118

Re: System excessively slow when there's no more memory available

wil93 wrote:

Thanks. The idea of chromium "not seeing" tmpfs's memory is nice, unfortunately I just tested with a different laptop and I get the same error.

I reported this as a chromium bug: https://code.google.com/p/chromium/issu … ?id=491959

Did your friends laptop get its RAM maxed out by Chrome? Same number of tabs? Around the same? What package of Chrome are you using? Is your friends laptop also running Arch?

Offline

#5 2015-05-26 00:56:40

wil93
Member
From: Italy
Registered: 2013-09-15
Posts: 72

Re: System excessively slow when there's no more memory available

Not the same number of tabs, quite a lot more, we just opened a lot of them (all of them with the spotify web player) until the system froze. I have the package: chromium 43.0.2357.65-1. He's using Ubuntu (I think it's chromium 41, I'm not sure, and maybe it was chrome instead of chromium)

Offline

Board footer

Powered by FluxBB