* Miciah Dashiel Butler Masters on Sat, Jul 24, 2010 at 06:53:05PM +0000:
> >On the contrary: This is the one sore spot i have with Elinks*.
> >If it is idle with more than, say, two or three tabs open, then
> >it racks up CPU usage to extremes, and it doesn't take much for
> >Elinks to gobble up the entire CPU just for being idle.

> I have never seen such behaviour with ELinks.  ELinks used to have
> a large number of wakeups (10 per second), but I fixed that problem
> (before 0.11.5 and 0.12pre2, I think).  My laptop often runs on battery,
> so I watch out for programs that cause excessive wakeups, and ELinks is
> does not cause excessive wakeups on my system.  I definitely have never
> seen it use a large amount of CPU while idle.

I've seen this behaviour more or less ever since I've been using
Elinks; that should have been since 0.11.something up to 0.12pre5
that I'm currently using.

> What version of ELinks are you using?  What OS are you using?  Do you
> have any user scripts?

I'm currently running Elinks-0.12pre5 on OpenBSD 4.6, but I see
the same behaviour also on the Ubuntu machine at work of which I
cannot remember the exact version at the moment (but it runs the
same Elinks version).

> I have an Intel Core 2 Duo, so I am very wary of high CPU usage.  I,
> too, have been frustrated on many occasions by high CPU usage causing
> my computer to shut down.

Right now, I've got approx. 13% _average_ CPU load just for the
elinks process (which sits completely idle), with only three open tabs.

> That's very odd.  I have 26 tabs in 3 terminals (which is very few for
> me), and ELinks is taking 372 MiB VSZ, and 86.3 MiB by its internel
> accounting (File -> Resource info).

I've now just resurrected my usual session that I've used to keep
open until the computer started smouldering :o):

................................ Resources .................................
.                                                                          .
.  Resources: 6 handles, 4 timers.                                         .
.  Connections: 0 connections, 0 connecting, 0 transferring, 4 keepalive.  .
.  Memory cache: 16532870 bytes, 617 files, 492 in use, 0 loading.         .
.  Document cache: 181 formatted, 100 in use, 0 refreshing.                .
.  Interlinking: slave terminal, 5 terminals, 105 sessions.                .
.                                                                          .
.                                  [ OK ]                                  .
............................................................................

top reports the following:
|   PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
|  3927 stefan     2   10   51M  247M sleep     poll     29:54 69.82% elinks

I've noted that memory consumption only starts to increase as time goes by.
Seems to be some hefty memory leak somewhere. Before I compiled Elinks with
the garbage collector, it would have segfaulted itself to death long before
even getting this far. Now, it just gobbles memory until it eventually
gets killed by the ulimit.

> How large is your cache? (See Document -> Cache -> Memory cache -> Size;
> I have 512M, which I consider rather large.)

Currently set to 50M.
I already tried tinkering with this setting, but I didn't notice
any significant difference.

> What OS are you using? (I
> am using Ubuntu Maverick with Linux 2.6.35rc5.)

OpenBSD 4.6 and some Ubuntu version at work which I don't
remember at the moment (will check the exact version on Monday).
Essentially, I see the same behaviour on both of them.

> How are you accounting memory? (Last I heard, it is notoriously
> difficult to get an accurate number on Linux because of COW on
> fork, shared libraries, and similar.)

Uhm... Just the "RES" column of top's output.
This seems to be the same memory accounting as the one that
counts against ulimit's "data segment size" limit (-d).

> What version of ELinks are you using?  Do you have any user scripts?  Do
> you have debugging enabled?  (Debugging might increase memory usage
> substantially.)

Elinks 0.12pre5, without user scripts, without debugging.
At the moment, the OpenBSD version has ECMAscript compiled in
(just to see whether it would be useful for something), but the
CPU/memory behaviour did not change in any way.

> Are you willing to investigate the problem with strace and possibly gdb?

I'd love to. Though I don't have much experience in debugging C
yet, so I'd probably need a few directions to get started.

Elinks is my primary browser; it's sad that I have to resort to a
GUI one just because of such a stupid problem. :o)


s//un

Attachment: pgp9R6yX2SQAt.pgp
Description: PGP signature

_______________________________________________
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users

Reply via email to