4GB RAM too little for Firefox?

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

4GB RAM too little for Firefox?

maillists.rulmer
Hi all,
after having Firefox running for some time (ca. 30min to 2h) my
system seems to become slow. I get frequent freezes for several
seconds, mpv instances start crashing and things like switching tabs
in Firefox become a pain.

I've got 4GB of RAM installed and when I look at htop after my system
became slow, I can see that OpenBSD started swapping. When I close
Firefox it takes several seconds and I can watch how my memory becomes
free again in htop. My system is then again responsive.

RAM prices seem to be low right now, but I don't want to spend money
uneedingly and I didn't have this problem under Linux. Has anyone had
similar experieces and noticed an improvement after a RAM upgrade?

Greetings
Richard Ulmer

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

Heppler, J. Scott
Richard Ulmer wrote:

> Hi all,
> after having Firefox running for some time (ca. 30min to 2h) my
> system seems to become slow. I get frequent freezes for several
> seconds, mpv instances start crashing and things like switching tabs
> in Firefox become a pain.
>
> I've got 4GB of RAM installed and when I look at htop after my system
> became slow, I can see that OpenBSD started swapping. When I close
> Firefox it takes several seconds and I can watch how my memory becomes
> free again in htop. My system is then again responsive.
>
> RAM prices seem to be low right now, but I don't want to spend money
> uneedingly and I didn't have this problem under Linux. Has anyone had
> similar experieces and noticed an improvement after a RAM upgrade?

OpenBSD derives some security by confining processes and web browsing
with firefox is notorious for memory leaks.

If you mobo supports it, more ram will also improve performance with
firefox and other memory intensive tasks.

Other options:

Adding the Firefox "forget" widget to your panel
https://support.mozilla.org/en-US/kb/forget-button-quickly-delete-your-browsing-history
and using it frequently.

Under preference disable access to webcams, microphone etc.

Consider www/iridium as an alternative browser.  You can export your
firefox bookmarks.html and import it into iridium.  Although I do not
have solid numbers, I thought it was better in this regard than firefox.

--
J. Scott Heppler

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

lists-2
Fri, 5 Jul 2019 08:09:26 -0700 "Heppler, J. Scott"
<[hidden email]>

> Richard Ulmer wrote:
> > Hi all,
> > after having Firefox running for some time (ca. 30min to 2h) my
> > system seems to become slow. I get frequent freezes for several
> > seconds, mpv instances start crashing and things like switching tabs
> > in Firefox become a pain.
> >
> > I've got 4GB of RAM installed and when I look at htop after my system
> > became slow, I can see that OpenBSD started swapping. When I close
> > Firefox it takes several seconds and I can watch how my memory becomes
> > free again in htop. My system is then again responsive.
> >
> > RAM prices seem to be low right now, but I don't want to spend money
> > uneedingly and I didn't have this problem under Linux. Has anyone had
> > similar experieces and noticed an improvement after a RAM upgrade?  
>
> OpenBSD derives some security by confining processes and web browsing
> with firefox is notorious for memory leaks.
>
> If you mobo supports it, more ram will also improve performance with
> firefox and other memory intensive tasks.
>
> Other options:
>
> Adding the Firefox "forget" widget to your panel
> https://support.mozilla.org/en-US/kb/forget-button-quickly-delete-your-browsing-history
> and using it frequently.
>
> Under preference disable access to webcams, microphone etc.
>
> Consider www/iridium as an alternative browser.  You can export your
> firefox bookmarks.html and import it into iridium.  Although I do not
> have solid numbers, I thought it was better in this regard than firefox.
>

Since you did not attach a single digit, number or figure, as measures of
comparison, consider the above information opinion only and nothing more.
In fact, if you switch the names of the programs, you cannot even notice.
Try to be more specific, at least compare the memory usage: show numbers.
Such fine advice, wasted over the simplest lack of information objection.

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

maillists.rulmer
In reply to this post by maillists.rulmer
> OpenBSD derives some security by confining processes and web browsing
> with firefox is notorious for memory leaks.
>
> If you mobo supports it, more ram will also improve performance with
> firefox and other memory intensive tasks.
Firefox is pretty much my only memory intensive task. Thanks for sharing
your opinion, though! One more incentive to buy the new ram stick.

> Other options:
>
> Adding the Firefox "forget" widget to your panel
> https://support.mozilla.org/en-US/kb/forget-button-quickly-delete-your-browsing-history
> and using it frequently.
That seems more like a workaround to me.

> Consider www/iridium as an alternative browser.  You can export your
> firefox bookmarks.html and import it into iridium.  Although I do not
> have solid numbers, I thought it was better in this regard than firefox.
I wrote two little scripts [1] that open five reddit.com threads in each
browser an print memory usage. The result was (besides my amazement
about how much RAM the browsers ate), that Firefox used up ca. 1.4G and
Iridium ca. 0.9G. I obviously haven't set up the same extensions, but it
seems like Iridium would be able to help me. I'm going to try it some
more. Thanks for the tip!

Best regards,
Richard Ulmer


[1]
```
printf 'Before starting Firefox:\n\t'
top | grep Memory
firefox --private-window 2>&1 > /dev/null &
sleep 5  # Wait for firefox to open
for i in c48qg7 c916tf c5n06b c0yvsz c2sco0; do
        firefox --private-window \
                "https://www.reddit.com/r/openbsd/comments/$i"
done
sleep 30  # Wait for all tabs to load
printf 'After starting Firefox:\n\t'
top | grep Memory
```

```
printf 'Before starting Iridium:\n\t'
top | grep Memory
iridium --incognito 2>&1 > /dev/null &
sleep 5  # Wait for Iridium to open
for i in c48qg7 c916tf c5n06b c0yvsz c2sco0; do
        iridium --incognito \
                "https://www.reddit.com/r/openbsd/comments/$i"
done
sleep 30  # Wait for all tabs to load
printf 'After starting Iridium:\n\t'
top | grep Memory
```

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

maillists.rulmer
In reply to this post by Heppler, J. Scott
> OpenBSD derives some security by confining processes and web browsing
> with firefox is notorious for memory leaks.
>
> If you mobo supports it, more ram will also improve performance with
> firefox and other memory intensive tasks.
Firefox is pretty much my only memory intensive task. Thanks for sharing
your opinion, though! One more incentive to buy the new ram stick.

> Other options:
>
> Adding the Firefox "forget" widget to your panel
> https://support.mozilla.org/en-US/kb/forget-button-quickly-delete-your-browsing-his
tory
> and using it frequently.
That seems more like a workaround to me.

> Consider www/iridium as an alternative browser.  You can export your
> firefox bookmarks.html and import it into iridium.  Although I do not
> have solid numbers, I thought it was better in this regard than firefox.
I wrote two little scripts [1] that open five reddit.com threads in each
browser an print memory usage. The result was (besides my amazement
about how much RAM the browsers ate), that Firefox used up ca. 1.4G and
Iridium ca. 0.9G. I obviously haven't set up the same extensions, but it
seems like Iridium would be able to help me. I'm going to try it some
more. Thanks for the tip!

Best regards,
Richard Ulmer


[1]
```
printf 'Before starting Firefox:\n\t'
top | grep Memory
firefox --private-window 2>&1 > /dev/null &
sleep 5  # Wait for firefox to open
for i in c48qg7 c916tf c5n06b c0yvsz c2sco0; do
        firefox --private-window \
                "https://www.reddit.com/r/openbsd/comments/$i"
done
sleep 30  # Wait for all tabs to load
printf 'After starting Firefox:\n\t'
top | grep Memory
```

```
printf 'Before starting Iridium:\n\t'
top | grep Memory
iridium --incognito 2>&1 > /dev/null &
sleep 5  # Wait for Iridium to open
for i in c48qg7 c916tf c5n06b c0yvsz c2sco0; do
        iridium --incognito \
                "https://www.reddit.com/r/openbsd/comments/$i"
done
sleep 30  # Wait for all tabs to load
printf 'After starting Iridium:\n\t'
top | grep Memory
```

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

Otto Moerbeek
On Fri, Jul 05, 2019 at 09:21:48PM +0200, [hidden email] wrote:

> > OpenBSD derives some security by confining processes and web browsing
> > with firefox is notorious for memory leaks.
> >
> > If you mobo supports it, more ram will also improve performance with
> > firefox and other memory intensive tasks.
> Firefox is pretty much my only memory intensive task. Thanks for sharing
> your opinion, though! One more incentive to buy the new ram stick.
>
> > Other options:
> >
> > Adding the Firefox "forget" widget to your panel
> > https://support.mozilla.org/en-US/kb/forget-button-quickly-delete-your-browsing-his
> tory
> > and using it frequently.
> That seems more like a workaround to me.
>
> > Consider www/iridium as an alternative browser.  You can export your
> > firefox bookmarks.html and import it into iridium.  Although I do not
> > have solid numbers, I thought it was better in this regard than firefox.
> I wrote two little scripts [1] that open five reddit.com threads in each
> browser an print memory usage. The result was (besides my amazement
> about how much RAM the browsers ate), that Firefox used up ca. 1.4G and
> Iridium ca. 0.9G. I obviously haven't set up the same extensions, but it
> seems like Iridium would be able to help me. I'm going to try it some
> more. Thanks for the tip!
>
> Best regards,
> Richard Ulmer
>
>
> [1]
> ```
> printf 'Before starting Firefox:\n\t'
> top | grep Memory
> firefox --private-window 2>&1 > /dev/null &
> sleep 5  # Wait for firefox to open
> for i in c48qg7 c916tf c5n06b c0yvsz c2sco0; do
>         firefox --private-window \
>                 "https://www.reddit.com/r/openbsd/comments/$i"
> done
> sleep 30  # Wait for all tabs to load
> printf 'After starting Firefox:\n\t'
> top | grep Memory
> ```
>
> ```
> printf 'Before starting Iridium:\n\t'
> top | grep Memory
> iridium --incognito 2>&1 > /dev/null &
> sleep 5  # Wait for Iridium to open
> for i in c48qg7 c916tf c5n06b c0yvsz c2sco0; do
>         iridium --incognito \
>                 "https://www.reddit.com/r/openbsd/comments/$i"
> done
> sleep 30  # Wait for all tabs to load
> printf 'After starting Iridium:\n\t'
> top | grep Memory
> ```
>

You still did not tell which platform you are running. It matters.

        -Otto


Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

maillists.rulmer
Otto Moerbeek <[hidden email]> wrote:
> You still did not tell which platform you are running. It matters.
>
> -Otto
I'm using a ThinkPad T450 (i5-5300U, SSD, FullHD Display for which 0.5G
of the RAM are used by the graphics card). Im running OpenBSD 6.5 and
use full disk encryption (don't know if this matters for swapping
performance).

Best Regards,
Richard Ulmer

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

Otto Moerbeek
On Sat, Jul 06, 2019 at 09:32:22AM +0200, [hidden email] wrote:

> Otto Moerbeek <[hidden email]> wrote:
> > You still did not tell which platform you are running. It matters.
> >
> > -Otto
> I'm using a ThinkPad T450 (i5-5300U, SSD, FullHD Display for which 0.5G
> of the RAM are used by the graphics card). Im running OpenBSD 6.5 and
> use full disk encryption (don't know if this matters for swapping
> performance).
>
> Best Regards,
> Richard Ulmer

That does not tell us the platform. It matters a lot if you are
running i386 or amd64. To make it explcit: what does "uname -p" say?

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

maillists.rulmer
Otto Moerbeek <[hidden email]> wrote:

> On Sat, Jul 06, 2019 at 09:32:22AM +0200, [hidden email] wrote:
>
> > Otto Moerbeek <[hidden email]> wrote:
> > > You still did not tell which platform you are running. It matters.
> > >
> > > -Otto
> > I'm using a ThinkPad T450 (i5-5300U, SSD, FullHD Display for which 0.5G
> > of the RAM are used by the graphics card). Im running OpenBSD 6.5 and
> > use full disk encryption (don't know if this matters for swapping
> > performance).
> >
> > Best Regards,
> > Richard Ulmer
>
> That does not tell us the platform. It matters a lot if you are
> running i386 or amd64. To make it explcit: what does "uname -p" say?
>
> -Otto
Oh, sorry, platform is amd64.

- -
Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

- -

Richard,

have you increased the shared memory limits and kern parameters in the
sysctl.conf for more relaxed desktop usage?

Jan


On 6 Jul 2019, at 10:11, [hidden email] wrote:

> Otto Moerbeek <[hidden email]> wrote:
>> On Sat, Jul 06, 2019 at 09:32:22AM +0200,
>> [hidden email] wrote:
>>
>>> Otto Moerbeek <[hidden email]> wrote:
>>>> You still did not tell which platform you are running. It matters.
>>>>
>>>> -Otto
>>> I'm using a ThinkPad T450 (i5-5300U, SSD, FullHD Display for which
>>> 0.5G
>>> of the RAM are used by the graphics card). Im running OpenBSD 6.5
>>> and
>>> use full disk encryption (don't know if this matters for swapping
>>> performance).
>>>
>>> Best Regards,
>>> Richard Ulmer
>>
>> That does not tell us the platform. It matters a lot if you are
>> running i386 or amd64. To make it explcit: what does "uname -p" say?
>>
>> -Otto
> Oh, sorry, platform is amd64.

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

Dumitru Moldovan-2
In reply to this post by maillists.rulmer
On Fri, Jul 05, 2019 at 01:25:10PM +0200, Richard Ulmer wrote:

>Hi all,
>after having Firefox running for some time (ca. 30min to 2h) my
>system seems to become slow. I get frequent freezes for several
>seconds, mpv instances start crashing and things like switching tabs
>in Firefox become a pain.
>
>I've got 4GB of RAM installed and when I look at htop after my system
>became slow, I can see that OpenBSD started swapping. When I close
>Firefox it takes several seconds and I can watch how my memory becomes
>free again in htop. My system is then again responsive.
>
>RAM prices seem to be low right now, but I don't want to spend money
>uneedingly and I didn't have this problem under Linux. Has anyone had
>similar experieces and noticed an improvement after a RAM upgrade?

I have a desktop from 2009 with 8GB of RAM and faced a similar issue
with recent Firefox versions.  For me, the problem was two-fold:

  1. Recent Firefox versions start 8 rendering processes for my system
  with 2 CPUs.  I limited this in the preferences to just 2, ending up
  with a total of 4 firefox processes at all times.

  2. Web apps have grown in size disproportionally lately.  You
  mentioned Reddit, their modern web interface is such a RAM-hungry
  monster.  Consider using old.reddit.com instead or, even better, an
  app leveraging their API.  In the same vein, replace Gmail with a
  light IMAP client, use git CLI tools instead of GitHub's web
  interface, etc.

Also, beware that Firefox leaks memory, especially with intensive web
apps.  I usually restart it once a day or so lately.  Another
workaround for unavoidable monster web apps is to use a dedicated
Chromium or Iridium instance per web app, eg. for Deezer's web player:
"iridium --app=https://deezer.com".

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

maillists.rulmer
In reply to this post by - -
Hi Jan,

"Jan Betlach" <[hidden email]> wrote:
>
> Richard,
>
> have you increased the shared memory limits and kern parameters in the
> sysctl.conf for more relaxed desktop usage?
>
> Jan
No I have not and I never heard of it. Here is the output of
`sysctl kern.shminfo`:
kern.shminfo.shmmax=33554432
kern.shminfo.shmmin=1
kern.shminfo.shmmni=128
kern.shminfo.shmseg=128
kern.shminfo.shmall=8192

Do you have a link for further reading on this?

Richard

>
> On 6 Jul 2019, at 10:11, [hidden email] wrote:
>
> > Otto Moerbeek <[hidden email]> wrote:
> >> On Sat, Jul 06, 2019 at 09:32:22AM +0200,
> >> [hidden email] wrote:
> >>
> >>> Otto Moerbeek <[hidden email]> wrote:
> >>>> You still did not tell which platform you are running. It matters.
> >>>>
> >>>> -Otto
> >>> I'm using a ThinkPad T450 (i5-5300U, SSD, FullHD Display for which
> >>> 0.5G
> >>> of the RAM are used by the graphics card). Im running OpenBSD 6.5
> >>> and
> >>> use full disk encryption (don't know if this matters for swapping
> >>> performance).
> >>>
> >>> Best Regards,
> >>> Richard Ulmer
> >>
> >> That does not tell us the platform. It matters a lot if you are
> >> running i386 or amd64. To make it explcit: what does "uname -p" say?
> >>
> >> -Otto
> > Oh, sorry, platform is amd64.


Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

maillists.rulmer
In reply to this post by Dumitru Moldovan-2
Hi Dumitru,

Dumitru Moldovan <[hidden email]> wrote:

> On Fri, Jul 05, 2019 at 01:25:10PM +0200, Richard Ulmer wrote:
> >Hi all,
> >after having Firefox running for some time (ca. 30min to 2h) my
> >system seems to become slow. I get frequent freezes for several
> >seconds, mpv instances start crashing and things like switching tabs
> >in Firefox become a pain.
> >
> >I've got 4GB of RAM installed and when I look at htop after my system
> >became slow, I can see that OpenBSD started swapping. When I close
> >Firefox it takes several seconds and I can watch how my memory becomes
> >free again in htop. My system is then again responsive.
> >
> >RAM prices seem to be low right now, but I don't want to spend money
> >uneedingly and I didn't have this problem under Linux. Has anyone had
> >similar experieces and noticed an improvement after a RAM upgrade?
>
> I have a desktop from 2009 with 8GB of RAM and faced a similar issue
> with recent Firefox versions.  For me, the problem was two-fold:
>
>   1. Recent Firefox versions start 8 rendering processes for my system
>   with 2 CPUs.  I limited this in the preferences to just 2, ending up
>   with a total of 4 firefox processes at all times.
You are refering to the "Content process limit" option in about:preferences,
right? I haven't changed it and it was still at 8. I set it to 2 and compared
the memory usage with the script I mentioned before. Memory usage went from
1474M to 1188M. That's a 20% improvement, not too bad, but will probably not
stop my computer from swapping. Thanks for the tip, I'll keep this setting!

>   2. Web apps have grown in size disproportionally lately.  You
>   mentioned Reddit, their modern web interface is such a RAM-hungry
>   monster.  Consider using old.reddit.com instead or, even better, an
>   app leveraging their API.  In the same vein, replace Gmail with a
>   light IMAP client, use git CLI tools instead of GitHub's web
>   interface, etc.
I already try to avoid slow websites by using dedicated applications
where possible (rtv for most of reddit, mblaze for mail, mpv for YouTube
videos, partly ytools for browsing YouTube). Sill, I often find myself
opening a bunch of StackOverflow, Reddit, Amazon, GitHub, ... pages in
parallel, when I'm researching something.

> Also, beware that Firefox leaks memory, especially with intensive web
> apps.  I usually restart it once a day or so lately.  Another
> workaround for unavoidable monster web apps is to use a dedicated
> Chromium or Iridium instance per web app, eg. for Deezer's web player:
> "iridium --app=https://deezer.com".
I heard multiple times now, that Firefox leaks memory. Maybe I'll give
a new browser a shot. Iridium looked interesting, but upon research
I found a lot of people concerned about whether this project has the
resources to keep up with Chromiums security standards. The last commit
for Iridium was 3 Months ago [1], so I'm not to sure if I want to use
it..

Greetings and thanks for your input,
Richard


[1] https://git.iridiumbrowser.de/cgit.cgi/iridium-browser/

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

Heppler, J. Scott
In reply to this post by maillists.rulmer
Richard Ulmar wrote
> Iridium looked interesting, but upon research
> I found a lot of people concerned about whether this project has the
> resources to keep up with Chromiums security standards. The last commit
> for Iridium was 3 Months ago [1], so I'm not to sure if I want to use
> it..

Robert Nagy is the OpenBSD ports maintainer for www/iridium and he also
also one of the iridium developers.  As far as iridium lagging Chromium
development, that is largely on the basis of new features rather than
security.  You can check by searching for Chromium cve's and cross
checking with the iridium version.  Unfortunately, there is not a
buildbot for iridium or chromium so you either have to wait for 6.6 to
get the latest version or run -current.  Still, I do not believe it has
any major security issues at this time.

Scott


Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

Allan Streib-2
In reply to this post by maillists.rulmer
Richard Ulmer <[hidden email]> writes:

> I heard multiple times now, that Firefox leaks memory. Maybe I'll give
> a new browser a shot. Iridium looked interesting, but upon research I
> found a lot of people concerned about whether this project has the
> resources to keep up with Chromiums security standards. The last
> commit for Iridium was 3 Months ago [1], so I'm not to sure if I want
> to use it..

I have recently encountered another issue with firefox, that is it will
fill up my /tmp partition with "ghost" files. Meaning, df(1) (and other
applications) will tell me that my 4GB /tmp is full, but I don't see any
files there and du(1) will say that /tmp only has 18KB used. If I kill
firefox, the /tmp space becomes available again.

Have not yet identified which site is triggering this behavior, but I
suspect it's one of Gmail, Google Sheets, etc which I tend to have open
for long periods of time.

OpenBSD 6.5 GENERIC.MP#1 amd64

Landry's FF build (67.0.4) with uBlock Origin.

Allan

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

ropers
On 08/07/2019, Allan Streib <[hidden email]> wrote:

> I have recently encountered another issue with firefox, that is it will
> fill up my /tmp partition with "ghost" files. Meaning, df(1) (and other
> applications) will tell me that my 4GB /tmp is full, but I don't see any
> files there and du(1) will say that /tmp only has 18KB used. If I kill
> firefox, the /tmp space becomes available again.
>
> Have not yet identified which site is triggering this behavior, but I
> suspect it's one of Gmail, Google Sheets, etc which I tend to have open
> for long periods of time.
>
> OpenBSD 6.5 GENERIC.MP#1 amd64
>
> Landry's FF build (67.0.4) with uBlock Origin.
>
> Allan

When you say, "ghost" files, you're not referring to mere dot-files, right?

I wonder if the following observations I made even a few years back
are sort of relevant here:

It used to be that when Firefox's Flash plugin (remember that?) for
Unix-likes used to buffer content like a video for example, that
content was saved as a file in /tmp, and it used to be possible to
easily find such files and e.g. pipe them to vlc or swfdec if the
corresponding online Flash media player was too decrepit. I'm not sure
when those files ultimately used to get deleted back then; maybe on
tab close or on browser restart, certainly on reboot.

However, later on, Firefox changed things so that it would unlink any
such files about as soon as it created them, even while still
appending data to them, by keeping (just) the file descriptor in
memory. On Linux, people could do lsof(8) and grep(1) shenanigans to
copy/recreate the file descriptor out of /dev, and thus resurrect the
file, so long as it was still open. OpenBSD uses fstat(1) instead of lsof,
and I never got those shenanigans to work on OpenBSD.

Similarly, when Firefox used to download files and downloads got
interrupted, Firefox used to always keep those partially downloaded
files, but I've now seen it at least on some recent versions that
those too are deleted, at least as soon as a download fails. At that
point I think the files are fully closed; I don't think I've been able
to recover anything there, not even with lsof on Linux.

Why am I telling you all this?

1. I think the same behaviour may be what's going on with your
so-called "ghost" files.
I.e.: Files and file descriptors get created, the files get unlinked,
but Firefox still has them open and *is still growing* them, which
continues until it actually fclose(3)s them.

2. I do seem to observe a bit of an anti-usability trend here, because
of course prematurely unlinking the files DOESN'T save any disk space,
but it DOES make it harder for users, sysadmins and add-on authors to
manage (pipe, copy, script-process, download-resume and reuse) such
files themselves.
This may be reflective of a wider struggle for control of computers
that we, ostensibly, own -- and ought to control. It jibes with the
increasing trend towards the point where, like Michael Sims put it, if
the desires of remote corporations "conflict with the desires of you,
the owner of the computer, their desires win."[1]
IMNSHO, Mozilla, and others, have largely fallen prey to regulatory
capture,[2] i.e. they're the "regulators", and they've been *captured*
by corporations paying their employees to help out FOSS for
free^W^W^W^W^W inject their desires, corporate philosophy and bad
ideas until their desires win -- possibly without the people pushing
such changed agendas and bad ideas onto the FOSSverse even realising
what they're doing, which is the ultimate in plausible deniability.
Because seriously, why would you unlink files prematurely? Files that
you're continuing to grow? Is there any reason other than you want to
keep things hidden from, and out of the hands of dirty, dirty, pleb
users who had better pay a tax to you every time they click play?[3]

Remember, DRM and DRM-like designs exist to stop you from doing things
that are ALLOWED by copyright. On this, also *vide* Sims.

Sorry for the sermon. I felt it was at least relevant.

Ian

PS: Firefox also has increasingly taken to turning things that used to
be more easily understandable and discoverable files into databases.
I'm sure they had only excellent reasons and no obscurantist agenda...

PPS: Of course, it's not just Firefox/Mozilla; it's just that it's
particularly noticeable with those, because you would expect better
from them -- or maybe *you* wouldn't, but I used to.

[1] https://www.youtube.com/watch?v=VAR42TMIhoU&t=14m20s
[2] https://en.wikipedia.org/wiki/Regulatory_capture
[3] https://en.wikipedia.org/wiki/Rent-seeking

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

Allan Streib-2
ropers <[hidden email]> writes:

> 1. I think the same behaviour may be what's going on with your
> so-called "ghost" files.
> I.e.: Files and file descriptors get created, the files get unlinked,
> but Firefox still has them open and *is still growing* them, which
> continues until it actually fclose(3)s them.

Yes, this is the behavior. They are not "dot-files" or any other
obscured file name, as du(1) should find those, and nothing that would
account for the space is found in the output of "ls -alR /tmp" either.

It does behave like the file is opened and then unlinked. Sorry for my
term "ghost" file I couldn't quite find the right words for what I was
seeing.

Allan

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

Todd C. Miller-3
On Mon, 08 Jul 2019 15:59:54 -0400, Allan Streib wrote:

> It does behave like the file is opened and then unlinked. Sorry for my
> term "ghost" file I couldn't quite find the right words for what I was
> seeing.

You can use the fstat command to find these files (even if unlinked)
as well as the ID of the process that has them open.  For example:

    fstat -f /tmp

 - todd

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

ropers
Just for the record, I think *my* (not the OP's) problem when trying
to grep fstat results was that unlike lsof, fstat didn't show the
former file names (hence unlinked); it only showed inodes, so I never
got the "find this former file" part to work on OpenBSD.
I have since found this blog post, where your man seems to have had
the same problem, and where he had written a script with ncheck_ffs(8)
to hack his way around that. That's a 13 year-old post though, and I
haven't tried it:
http://geek00l.blogspot.com/2006/03/openbsd-fstat-vs-lsof.html
There used to be an OpenBSD lsof port, as per what's listed on
ports.su, but there's no amd64 package now, and I never got that port
to work either.
Still, if someone were determined and actually competent, maybe some
of this info could help in similar situations.

Ian

On 08/07/2019, Todd C. Miller <[hidden email]> wrote:

> On Mon, 08 Jul 2019 15:59:54 -0400, Allan Streib wrote:
>
>> It does behave like the file is opened and then unlinked. Sorry for my
>> term "ghost" file I couldn't quite find the right words for what I was
>> seeing.
>
> You can use the fstat command to find these files (even if unlinked)
> as well as the ID of the process that has them open.  For example:
>
>     fstat -f /tmp
>
>  - todd
>

Reply | Threaded
Open this post in threaded view
|

Re: 4GB RAM too little for Firefox?

Stuart Henderson
On 2019-07-09, ropers <[hidden email]> wrote:

> Just for the record, I think *my* (not the OP's) problem when trying
> to grep fstat results was that unlike lsof, fstat didn't show the
> former file names (hence unlinked); it only showed inodes, so I never
> got the "find this former file" part to work on OpenBSD.
> I have since found this blog post, where your man seems to have had
> the same problem, and where he had written a script with ncheck_ffs(8)
> to hack his way around that. That's a 13 year-old post though, and I
> haven't tried it:
> http://geek00l.blogspot.com/2006/03/openbsd-fstat-vs-lsof.html
> There used to be an OpenBSD lsof port, as per what's listed on
> ports.su, but there's no amd64 package now, and I never got that port
> to work either.

The lsof port didn't display filenames. That information is not
available on OpenBSD (and is not trustworthy on other OS either;
files could have been moved/replaced since opening).


12