FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 03-08-2012, 01:57 AM
Frank Steinmetzger
 
Default Disk usage during emerge

Hello list

It came to my attention that during (after) an emerge run, df reports
considerably less space available on my / than before the emerge (everything
except /home sits on the root partition). I was wondering how this comes to
be, since I have /var/tmp/portage on tmpfs.

I am in the middle of a KDE upgrade (4.8.0→4.8.1) right now and before I
started, I downloaded all distfiles and then looked at df /, it showed 1022
blocks, hence about 1 GB of free disk space. I am at package 115 out of 174
right now, and df shows a mere 389k blocks remaining.

Also before I began the emerge run, I started 'ncdu -x /' which scans all dirs
on the / partition and then I can browse through my FS hieararchy, showing the
disk usage of every directory. Now I ran the same ncdu command again in
another screen, so I can compare it with the first one.

The folders themselves have 0.1 to 0.2 GB difference between their old and new
state, and ncdu's bottom bar even shows the same values for both apparent and
real total disk usage (rounded to 0.1 GB). So what am I missing here? I
searched df's man page for something about apparent sizes/sparse files, but
then again, why would portage create such files in the first place?

Do you have any thoughts that might help me understand what I'm seeing?
--
Gruß | Greetings | Qapla'
I forbid any use of my email addresses with Facebook services.

You will find everything in an online database.
Just not what you are looking for.
 
Old 03-08-2012, 04:38 AM
Paul Hartman
 
Default Disk usage during emerge

On Wed, Mar 7, 2012 at 8:57 PM, Frank Steinmetzger <Warp_7@gmx.de> wrote:
> Hello list

Hi

> It came to my attention that during (after) an emerge run, df reports
> considerably less space available on my / than before the emerge (everything
> except /home sits on the root partition). I was wondering how this comes to
> be, since I have /var/tmp/portage on tmpfs.

Perhaps because of downloading of the distfiles? Or did you already
exclude those from the totals?
 
Old 03-08-2012, 05:08 AM
Bryan Gardiner
 
Default Disk usage during emerge

On Wed, 7 Mar 2012 23:38:39 -0600
Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
>
> Perhaps because of downloading of the distfiles? Or did you already
> exclude those from the totals?

It sounds like he downloaded distfiles before checking.

> I downloaded all distfiles and then looked at df /, it showed 1022
> blocks, hence about 1 GB of free disk space.

Do you mean 1022k blocks to give 1GiB? Since each block is normally
1KiB...

One hypothesis would be that if you are running KDE while doing the
upgrade, then the kernel can't immediately overwrite some of the 4.8.0
files with 4.8.1, because if you're still running the old 4.8.0
binaries, libraries, etc. in memory, they are kept around on disk
until the processes using them finish (though during that time, all
accesses to those filenames will reach the new versions). Once you
log out / reboot, this old space will be reclaimed. I'm not sure how
much this affects something like KDE that relies heavily on shared
libraries. Of course if the space stays used then it's some other
cause entirely.

Also, this is tangental to your problem, but don't forget about
"eclean-dist -d -f" if you want to clean up old distfiles .
 
Old 03-08-2012, 06:53 AM
Julian Simioni
 
Default Disk usage during emerge

On Wed, Mar 7, 2012 at 6:57 PM, Frank Steinmetzger <Warp_7@gmx.de> wrote:
>
> Hello list
>
> It came to my attention that during (after) an emerge run, df reports
> considerably less space available on my / than before the emerge (everything
> except /home sits on the root partition). I was wondering how this comes to
> be, since I have /var/tmp/portage on tmpfs.
>
> I am in the middle of a KDE upgrade (4.8.0→4.8.1) right now and before I
> started, I downloaded all distfiles and then looked at df /, it showed 1022
> blocks, hence about 1 GB of free disk space. I am at package 115 out of 174
> right now, and df shows a mere 389k blocks remaining.
>
> Also before I began the emerge run, I started 'ncdu -x /' which scans all dirs
> on the / partition and then I can browse through my FS hieararchy, showing the
> disk usage of every directory. Now I ran the same ncdu command again in
> another screen, so I can compare it with the first one.
>
> The folders themselves have 0.1 to 0.2 GB difference between their old and new
> state, and ncdu's bottom bar even shows the same values for both apparent and
> real total disk usage (rounded to 0.1 GB). So what am I missing here? I
> searched df's man page for something about apparent sizes/sparse files, but
> then again, why would portage create such files in the first place?
>
> Do you have any thoughts that might help me understand what I'm seeing?
> --
> Gruß | Greetings | Qapla'
> I forbid any use of my email addresses with Facebook services.
>
> You will find everything in an online database.
> Just not what you are looking for.

Unless you have it mounted on tmpfs for increased compilation speed as
many others do, /var/tmp/portage can easily grow to several hundred
megabytes as packages are compiled. Once the compilation finishes
successfully, it will be cleaned up, so the contents are constantly
changing during an emerge, and it may not be easy to track down after
the fact.
 
Old 03-08-2012, 06:54 AM
Julian Simioni
 
Default Disk usage during emerge

On Wed, Mar 7, 2012 at 11:53 PM, Julian Simioni
<julian.simioni@gmail.com> wrote:
> On Wed, Mar 7, 2012 at 6:57 PM, Frank Steinmetzger <Warp_7@gmx.de> wrote:
>>
>> Hello list
>>
>> It came to my attention that during (after) an emerge run, df reports
>> considerably less space available on my / than before the emerge (everything
>> except /home sits on the root partition). I was wondering how this comes to
>> be, since I have /var/tmp/portage on tmpfs.
>>
>> I am in the middle of a KDE upgrade (4.8.0→4.8.1) right now and before I
>> started, I downloaded all distfiles and then looked at df /, it showed 1022
>> blocks, hence about 1 GB of free disk space. I am at package 115 out of 174
>> right now, and df shows a mere 389k blocks remaining.
>>
>> Also before I began the emerge run, I started 'ncdu -x /' which scans all dirs
>> on the / partition and then I can browse through my FS hieararchy, showing the
>> disk usage of every directory. Now I ran the same ncdu command again in
>> another screen, so I can compare it with the first one.
>>
>> The folders themselves have 0.1 to 0.2 GB difference between their old and new
>> state, and ncdu's bottom bar even shows the same values for both apparent and
>> real total disk usage (rounded to 0.1 GB). So what am I missing here? I
>> searched df's man page for something about apparent sizes/sparse files, but
>> then again, why would portage create such files in the first place?
>>
>> Do you have any thoughts that might help me understand what I'm seeing?
>> --
>> Gruß | Greetings | Qapla'
>> I forbid any use of my email addresses with Facebook services.
>>
>> You will find everything in an online database.
>> Just not what you are looking for.
>
> Unless you have it mounted on tmpfs for increased compilation speed as
> many others do, /var/tmp/portage can easily grow to several hundred
> megabytes as packages are compiled. Once the compilation finishes
> successfully, it will be cleaned up, so the contents are constantly
> changing during an emerge, and it may not be easy to track down after
> the fact.
And only after hitting send to I register the line where you mention
that you do in fact use tmpfs. doh!
 
Old 03-08-2012, 09:50 AM
Nikos Chantziaras
 
Default Disk usage during emerge

On 08/03/12 04:57, Frank Steinmetzger wrote:

It came to my attention that during (after) an emerge run, df reports
considerably less space available on my / than before the emerge (everything
except /home sits on the root partition). I was wondering how this comes to
be, since I have /var/tmp/portage on tmpfs.

I am in the middle of a KDE upgrade (4.8.0→4.8.1) right now and before I
started, I downloaded all distfiles and then looked at df /, it showed 1022
blocks, hence about 1 GB of free disk space. I am at package 115 out of 174
right now, and df shows a mere 389k blocks remaining.


That's because the old files are not being deleted since they are in
use. When you logout of KDE and restart the whole stack
(/etc/init.d/xdm restart) then everything will be back to normal.


Or simply reboot.
 
Old 03-08-2012, 01:55 PM
Frank Steinmetzger
 
Default Disk usage during emerge

On Thu, Mar 08, 2012 at 12:50:40PM +0200, Nikos Chantziaras wrote:
> On 08/03/12 04:57, Frank Steinmetzger wrote:
> > It came to my attention that during (after) an emerge run, df reports
> > considerably less space available on my / than before the emerge (everything
> > except /home sits on the root partition). I was wondering how this comes to
> > be, since I have /var/tmp/portage on tmpfs.
> >
> > I am in the middle of a KDE upgrade (4.8.0→4.8.1) right now and before I
> > started, I downloaded all distfiles and then looked at df /, it showed 1022
> > blocks, hence about 1 GB of free disk space. I am at package 115 out of 174
> > right now, and df shows a mere 389k blocks remaining.
>
> That's because the old files are not being deleted since they are in
> use. When you logout of KDE and restart the whole stack
> (/etc/init.d/xdm restart) then everything will be back to normal.

By jove, that's definitely it. I knew about this fact from other use cases
(like deleting a video file which I'm still watching. HA, do that, Windows!),
but never thought of it regarding emerging. I always assumed for some reason
that the files were kept in RAM and the physical file itself was no longer
relevant. Just closing all programs before logging out gave back around 350 M.

And yes, I had a typo in the original mail; instead of 1000 blocks I meant
1000k Blocks. And also yes, I already knew about eclean-dist. I even wrote a
counterpart for Debian which deletes all .debs that aren't installed anymore,
but keeps all the rest. Anyway, after the reboot I now have 1059k blocks free.

--
Gruß | Greetings | Qapla'
I forbid any use of my email addresses with Facebook services.

“Oh, gravity, thou art a heartless bitch.” – Sheldon Cooper
 
Old 03-08-2012, 02:56 PM
Nikos Chantziaras
 
Default Disk usage during emerge

On 08/03/12 16:55, Frank Steinmetzger wrote:

On Thu, Mar 08, 2012 at 12:50:40PM +0200, Nikos Chantziaras wrote:

On 08/03/12 04:57, Frank Steinmetzger wrote:

It came to my attention that during (after) an emerge run, df reports
considerably less space available on my / than before the emerge


That's because the old files are not being deleted since they are in
use. When you logout of KDE and restart the whole stack
(/etc/init.d/xdm restart) then everything will be back to normal.


By jove, that's definitely it. I knew about this fact from other use cases
(like deleting a video file which I'm still watching. HA, do that, Windows!),
but never thought of it regarding emerging. I always assumed for some reason
that the files were kept in RAM and the physical file itself was no longer
relevant. Just closing all programs before logging out gave back around 350 M.


I discovered this nifty little tool recently that tells you if any
deleted files are currently being kept open by running processes:
"app-admin/checkrestart". I usually run it after world updates so I can
tell whether I need a restart or not.
 
Old 03-08-2012, 07:01 PM
Alan McKinnon
 
Default Disk usage during emerge

On Thu, 08 Mar 2012 17:56:18 +0200
Nikos Chantziaras <realnc@arcor.de> wrote:

> On 08/03/12 16:55, Frank Steinmetzger wrote:
> > On Thu, Mar 08, 2012 at 12:50:40PM +0200, Nikos Chantziaras wrote:
> >> On 08/03/12 04:57, Frank Steinmetzger wrote:
> >>> It came to my attention that during (after) an emerge run, df
> >>> reports considerably less space available on my / than before the
> >>> emerge
> >>
> >> That's because the old files are not being deleted since they are
> >> in use. When you logout of KDE and restart the whole stack
> >> (/etc/init.d/xdm restart) then everything will be back to normal.
> >
> > By jove, that's definitely it. I knew about this fact from other
> > use cases (like deleting a video file which I'm still watching. HA,
> > do that, Windows!), but never thought of it regarding emerging. I
> > always assumed for some reason that the files were kept in RAM and
> > the physical file itself was no longer relevant. Just closing all
> > programs before logging out gave back around 350 M.
>
> I discovered this nifty little tool recently that tells you if any
> deleted files are currently being kept open by running processes:
> "app-admin/checkrestart". I usually run it after world updates so I
> can tell whether I need a restart or not.
>
>
>

Why go to the effor tof emerging another package? Use what you already
have:

lsof | egrep '(deleted)$'

--
Alan McKinnnon
alan.mckinnon@gmail.com
 
Old 03-08-2012, 10:42 PM
walt
 
Default Disk usage during emerge

On 03/08/2012 12:01 PM, Alan McKinnon wrote:

> lsof | egrep '(deleted)$'

From 'man grep':

"Direct invocation as either egrep or fgrep is deprecated, but is
provided to allow historical applications that rely on them to
run unmodified."

Seems you've been promoted to the rank of Historical Application.

Congratulations, and a very warm welcome to the club
 

Thread Tools




All times are GMT. The time now is 12:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org