WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Excessive memory usage (reversible) in links browser  (Read 3535 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Excessive memory usage (reversible) in links browser
« on: August 26, 2010, 02:51:08 AM »
Found links in graphics mode using X with RES mem usage 99284 KB  :o
3 windows, last one was open since max. 2 days.
After closing last opened window RES mem usage dropped to 20260 KB
After hitting "Flush all caches" RES mem usage further dropped to 9004 KB
I only thought about looking at "Resources info" after I already had closed last opened window...
« Last Edit: August 26, 2010, 10:27:01 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Suspected memory leak in links browser
« Reply #1 on: August 26, 2010, 06:52:30 AM »
Please report any bugs upstream as well.
The only barriers that can stop you are the ones you create yourself.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Suspected memory leak in links browser
« Reply #2 on: August 26, 2010, 07:00:46 AM »
Debian, Ubuntu, and Gentoo use the same 2.3pre1 version, and neither uses a patch for memory leak nor do I see it mentioned in any open bugs related to it.  

Doesn't mean that there is not a leak, I am just going to hold off on downgrading back to 2.2.  I will open a window, surf a little, and leave it open the next few days while I am gone and see if I observe the same behavior.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Suspected memory leak in links browser
« Reply #3 on: August 26, 2010, 08:07:22 AM »
Can reproduce:

uploading file of 5657 KB as webmail attachment

RES mem before: 9008 KB
                  after: 76952 KB
                  after saving mail as draft: 99600 KB
                  after closing window: 20332 KB
                  flush all caches --> 9008 KB

2 windows are permanently open since at least 5 days.
So it is not a mem leakage of the app per se in the sense of being irreversible.
« Last Edit: August 26, 2010, 08:32:53 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Suspected memory leak in links browser
« Reply #4 on: August 26, 2010, 08:10:05 AM »
Isn't it just a cache which is causing a typical LINUX question, why free RAM is so low when nothing is running... ?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Suspected memory leak in links browser
« Reply #5 on: August 26, 2010, 08:26:32 AM »
Big difference between the two:
System cache would never show as RES mem usage, and is not in an obvious way associated to any particular app.
I am referring to links' application internal cache which can be freed from menu.

It is a limitation of busybox 'free' not to show how much of used mem is cache.
Particularly in TC 'sudo cache-clear' can be used to free RAM from cache.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Suspected memory leak in links browser
« Reply #6 on: August 26, 2010, 08:47:26 AM »
Jason,
as you mentioned downgrading...
I am keeping links 2.1pre28 for the particular reason that this is the latest version including (whatever limited) javascript support.
Same behaviour can be reproduced.
So I don't think there is any reason bothering about downgrading.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Suspected memory leak in links browser
« Reply #7 on: August 26, 2010, 10:12:22 AM »
Judging by the additional info and some of my own tests, though brief ones, I think we are good to stay put.

I agree that it most likely not an actual memory leak, but rather the way links is using and freeing resources.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Excessive memory usage (reversible) in links browser
« Reply #8 on: August 26, 2010, 10:37:54 AM »
Topic title (subject of first post) modified accordingly.

BTW, hitting "Flush all caches" without closing window would bring it down to ~44000 KB.
I could at no point observe any particularly increased values in "Resources info"
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ACRizona

  • Jr. Member
  • **
  • Posts: 61
Re: Excessive memory usage (reversible) in links browser
« Reply #9 on: September 17, 2010, 05:35:25 PM »
Why did you install the LINKS browser ?  Quicker ? Lighter ?

Somewhere between Dillo and Firefox,,, I'm pleased with Midori.
But I'm still wanting a simple fast browser.

Your comments welcomed.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Excessive memory usage (reversible) in links browser
« Reply #10 on: September 18, 2010, 12:02:42 AM »
That's a very generic question.
I'd invite you to read documentation of links2 to see all of its features and its capacities (many of them unique).

Personally I have never used midori, and checking it's dependency chain I have no appetite to try, it has sure a significantly way bigger footstep compared to firefox (which I have used in the past but gave up on it since a long time).

(midori = 36.71MB; firefox = 22.36MB; links [with graphics support] = 3.85MB; all incl. deps)
« Last Edit: September 18, 2010, 08:25:53 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)