Networking Forums

Networking Forums > Computer Networking > Linux Networking > chrome questions

Reply
Thread Tools Display Modes

chrome questions

 
 
Hactar
Guest
Posts: n/a

 
      06-07-2011, 03:13 PM
I run two browsers, Firefox 3.6.13 and Chrome 10.0.648.82 dev. I use
Firefox if a site doesn't deal well with Chrome -- in the last few days,
that's eBay. Also if I need to scope out Javascript permissions, that's
much easier in FF. But C wins hand down for memory management and CPU
use.

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.

2. Each tab loads with a random delay, say between 0 and 120
seconds.

3. Chrome crashes all tabs, replacing the contents with the "Oh
snap! Something went wrong while displaying this webpage." message,
and only loads it when I hit F5. Chrome doesn't have a "Refresh all
tabs" command, so this would either take a while or be an "as needed"
procedure.

Any ideas?

--
-eben (E-Mail Removed) royalty.mine.nu:81
> A: It's annoying as hell
> Q: Why do most people hate top-posting? -- Lots42 The Library Avenger

http://www.fscked.co.uk/writing/top-posting-cuss.html
 
Reply With Quote
 
 
 
 
Richard Kettlewell
Guest
Posts: n/a

 
      06-07-2011, 03:41 PM
(E-Mail Removed) (Hactar) writes:
> 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).


How many tabs do you have???

--
http://www.greenend.org.uk/rjk/
 
Reply With Quote
 
Hactar
Guest
Posts: n/a

 
      06-07-2011, 04:19 PM
In article <(E-Mail Removed)>,
Richard Kettlewell <(E-Mail Removed)> wrote:
> (E-Mail Removed) (Hactar) writes:
> > 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).

>
> How many tabs do you have???


How does one get an exact number? Oh, hang on... no, that doesn't work
(shift-esc, "stats for nerds"). Well, say 60 +/- 2. Every now and then
I copy a bunch of tabs' URLs to my log and close the tab, or worse, a
browser crashes so badly it forgets the list of open tabs and I have to
start fresh with whatever I can recall or extract from the history.

What is the signal for ^Z? SIGSTOP?

--
-eben (E-Mail Removed) royalty.mine.nu:81

Hi! I'm a .sig virus! Copy me to your .sig!

 
Reply With Quote
 
Tobias Blass
Guest
Posts: n/a

 
      06-07-2011, 05:09 PM
On 2011-06-07, Hactar <(E-Mail Removed)> wrote:
> I run two browsers, Firefox 3.6.13 and Chrome 10.0.648.82 dev. I use
> Firefox if a site doesn't deal well with Chrome -- in the last few days,
> that's eBay. Also if I need to scope out Javascript permissions, that's
> much easier in FF. But C wins hand down for memory management and CPU
> use.
>
> 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.
>
> 2. Each tab loads with a random delay, say between 0 and 120
> seconds.
>
> 3. Chrome crashes all tabs, replacing the contents with the "Oh
> snap! Something went wrong while displaying this webpage." message,
> and only loads it when I hit F5. Chrome doesn't have a "Refresh all
> tabs" command, so this would either take a while or be an "as needed"
> procedure.
>
> Any ideas?
>


You could just choose "Open the Homepage" instead of "Reopen the pages that
were open last" (and then choose "new Tab page" as your homepage)
 
Reply With Quote
 
Richard Kettlewell
Guest
Posts: n/a

 
      06-07-2011, 06:17 PM
(E-Mail Removed) (Hactar) writes:
> Richard Kettlewell <(E-Mail Removed)> wrote:
>> (E-Mail Removed) (Hactar) writes:


>>> 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).

>>
>> How many tabs do you have???

>
> How does one get an exact number? Oh, hang on... no, that doesn't work
> (shift-esc, "stats for nerds"). Well, say 60 +/- 2. Every now and then
> I copy a bunch of tabs' URLs to my log and close the tab, or worse, a
> browser crashes so badly it forgets the list of open tabs and I have to
> start fresh with whatever I can recall or extract from the history.


Sounds like you would benefit from using bookmarks.

> What is the signal for ^Z? SIGSTOP?


^Z sends SIGTSTP.

--
http://www.greenend.org.uk/rjk/
 
Reply With Quote
 
Hactar
Guest
Posts: n/a

 
      06-07-2011, 06:49 PM
In article <islm15$r6n$(E-Mail Removed)>,
Tobias Blass <(E-Mail Removed)> wrote:
> On 2011-06-07, Hactar <(E-Mail Removed)> 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.

....
> > Any ideas?

>
> You could just choose "Open the Homepage" instead of "Reopen the pages that
> were open last" (and then choose "new Tab page" as your homepage)


Cool, how to make the browser forget all the tabs _without_ waiting for
a crash! Unless that does something other than what I think it does?
Also, the GUI is darn near unusable during Chrome's startup due to all
the thrashing.

I'm writing a script that suspends all the chrome 'renderer' process
(SIGSTOP), then resumes them one at a time (SIGCONT), waiting each time
until the load drops. Takes longer than say an ad break, but much less
time than before.

--
-eben (E-Mail Removed) http://royalty.mine.nu:81
ARIES: The look on your face will be priceless when you find that 40lb
watermelon in your colon. Trade toothbrushes with an albino dwarf, then
give a hickey to Meryl Streep. -- Weird Al, _Your Horoscope for Today_
 
Reply With Quote
 
Hactar
Guest
Posts: n/a

 
      06-07-2011, 09:37 PM
In article <npr1c8-(E-Mail Removed)>, Hactar <(E-Mail Removed)> 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
 
Reply With Quote
 
Loki Harfagr
Guest
Posts: n/a

 
      06-08-2011, 04:59 PM
Tue, 07 Jun 2011 11:13:27 -0400, Hactar did catÂ*:

> I run two browsers, Firefox 3.6.13 and Chrome 10.0.648.82 dev. I use
> Firefox if a site doesn't deal well with Chrome -- in the last few days,
> that's eBay. Also if I need to scope out Javascript permissions, that's
> much easier in FF. But C wins hand down for memory management and CPU
> use.
>
> 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.
>
> 2. Each tab loads with a random delay, say between 0 and 120
> seconds.
>
> 3. Chrome crashes all tabs, replacing the contents with the "Oh
> snap! Something went wrong while displaying this webpage." message,
> and only loads it when I hit F5. Chrome doesn't have a "Refresh all
> tabs" command, so this would either take a while or be an "as needed"
> procedure.
>
> Any ideas?


try something like this example:

( WOOP=./beammeup ; rm -r $WOOP ; mkdir $WOOP ; touch $WOOP/First\ Run ; chrome --user-data-dir=$WOOP ; rm -r $WOOP )

there are ways (with crossed mounts and more) to even go a few steps beyond but this
should help you to fire up a chrome session in a handful of seconds whether you
have a stuck session or a thousand.
(At least it works fine on my installations, ATM using Chromium 13.0.752.0)
Play with it, control the 'rm' part to see if there are pieces you'd like to
export/save/control before washing the board.

(and, yes, that's different from the '--incognito' mode)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A few more questions regarding RIS Eric Windows Networking 0 02-27-2008 02:59 PM
VPN questions. steve Network Routers 0 07-22-2006 05:04 PM
mn-740 questions Anon Broadband Hardware 0 04-04-2004 05:57 PM
questions~ noricat Linux Networking 1 01-10-2004 02:32 PM
Questions Mcploppy © Broadband 15 08-14-2003 09:46 AM



1 2 3 4 5 6 7 8 9 10 11