Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.networking > #348
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | ebenZEROONE@verizon.net (Hactar) |
| Newsgroups | comp.os.linux.networking |
| Subject | Re: chrome questions |
| Date | Tue, 7 Jun 2011 17:37:47 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 77 |
| Message-ID | <bai2c8-gji.ln1@pc.home> (permalink) |
| References | <npr1c8-fbv.ln1@pc.home> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | mx04.eternal-september.org; posting-host="RBh+OnuFQYpBoJBVW+Uo0Q"; logging-data="20282"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+BNStNhr1ygb3uQsH7rjAK" |
| Originator | eben@pc.home (Eben King) |
| X-Newsreader | trn 4.0-test76 (Apr 2, 2001) |
| X-No-ahbou | yes |
| X-GetARealNewsreader | <! |
| X-Face | $/l:}sIrV@ebX4l8a`l.7j#B:>O~R&,e07C6?Th7atH"C~AW%c!1~C%Z!#2W<zAyF'Y0"~\lLMpPE$&3gN~s9=X<5=NF`%ngs&:+56-YTDgK[XGX%1El.]DWi(Uii4XTO@cGM5&qn`f=,$g}QPkY8o3{yYHWf?:}Mig] |
| Cancel-Lock | sha1:yX9DANq4/sxGxK7iF2y3sOjd3gk= |
| Xref | x330-a1.tempe.blueboxinc.net comp.os.linux.networking:348 |
Show key headers only | View raw
In article <npr1c8-fbv.ln1@pc.home>, Hactar <ebenZEROONE@verizon.net> wrote:
>
> However, Chrome takes forever and a day to start up, because it tries to
> refresh every tab at once, and there's not enough memory for that (I'm
> maxed out at 8 GiB). Chrome trying though, makes the system thrash like
> crazy and drives the load up over 20. The system becomes unusable,
> taking several minutes to respond to a keypress. It takes 30-40 minutes
> to resume normalcy. I've thought of several solutions (listed in order
> of preference), but I don't know if any of them are possible.
>
> 1. Chrome postpones loading further tabs until the load drops below
> (say) 4.
Got a workaround. Takes about 4min on an Athlon 64x2, 8 GiB, ~60 tabs.
YMMV. It's a poor-man's implementation of #1 above. If you
want to do it too, add this to your ~/.bashrc :
alias cproc='ps ax | grep "[c]hrome.*renderer" | sed "s/^ *//" | cut -f 1 -d " "'
alias csusp='cproc | xargs kill -STOP'
cstart() {
maxload=4
pidtime=3
sleeptime=5 # it only updates every 5s anyway
counter=0
pids=(`cproc | tr '\n' ' '`)
pidcount=${#pids[@]}
clrmv="$(tput dl1 ; tput hpa 0)"
getload() {
uptime | sed 's/^.*load average: \([^,]*\),.*$/\1/'
}
times100() {
dc -e "$1 100 * p" | sed 's/\..*$//'
}
maxload100=$(times100 $maxload)
waitloop() {
itll_do=no
while [ $itll_do = no ] ; do
load=$(getload)
load100=$(times100 $load)
if [ $load100 -lt $maxload100 ] ; then
itll_do=yes
else
echo -n "Load=$load; waiting"
sleep $sleeptime
echo -n "$clrmv"
fi
done
}
if [ $pidcount -eq 0 ] ; then
echo 'No Chrome processes!'
else
echo -n $pidcount Chrome tab groups,
csusp
echo " all of which are suspended."
for pid in ${pids[@]} ; do
counter=$((counter+1))
waitloop
echo -n "Resuming Chrome tab group $counter/$pidcount (PID $pid): "
kill -CONT $pid
echo done.
sleep $pidtime
done
fi
}
--
The people don't want war, but it is a simple matter to drag the people
along. The people can always be brought to the bidding of the leaders.
All you have to do is tell them they are being attacked, and denounce the
pacifists for lack of patriotism and exposing the country to danger. - HG
Back to comp.os.linux.networking | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
chrome questions ebenZEROONE@verizon.net (Hactar) - 2011-06-07 11:13 -0400
Re: chrome questions Richard Kettlewell <rjk@greenend.org.uk> - 2011-06-07 16:41 +0100
Re: chrome questions ebenZEROONE@verizon.net (Hactar) - 2011-06-07 12:19 -0400
Re: chrome questions Richard Kettlewell <rjk@greenend.org.uk> - 2011-06-07 19:17 +0100
Re: chrome questions Tobias Blass <tobiasblass@gmx.net> - 2011-06-07 17:09 +0000
Re: chrome questions ebenZEROONE@verizon.net (Hactar) - 2011-06-07 14:49 -0400
Re: chrome questions ebenZEROONE@verizon.net (Hactar) - 2011-06-07 17:37 -0400
Re: chrome questions Loki Harfagr <l0k1@thedarkdesign.free.fr.INVALID> - 2011-06-08 16:59 +0000
csiph-web