| View previous topic :: View next topic |
| Author |
Message |
lunarg Guru


Joined: 07 Jan 2004 Posts: 508 Location: Peer, Belgium
|
Posted: Wed Jan 05, 2005 4:28 pm Post subject: |
|
|
| ThinkingInBinary wrote: | | dabicho wrote: | | i.e. my reiserfs has a blocksize of 4kb, so each .keep file takes 4kb plus an entry in the inode table. |
Um... unless you use "notail" in your fstab, reiserfs will pack multiple small files into one block and put tiny files in the slack space of the last block of larger files. Blocks become simply an addressing system rather than the way space is partitioned. |
Moreover, reiserfs, doesn't use inodes... _________________ Registered linux user #341804
Visit Black Manticore: http://www.blackmanticore.com/ |
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8862 Location: beyond the rim
|
Posted: Wed Jan 05, 2005 5:37 pm Post subject: |
|
|
| chemmett wrote: | | FWIW, I think those are a result of the gentoo developers using CVS. Unlike tar, CVS won't save and create empty directories. |
wrong. They are just there to stop portage from removing empty directories. |
|
| Back to top |
|
 |
g4c9z Apprentice

Joined: 03 Jun 2004 Posts: 178
|
Posted: Tue Feb 08, 2005 12:19 am Post subject: |
|
|
Um, I'm wondering - wouldn't a better design be to query the ebuild when removing folders, to see whether the folder should be kept, instead of checking whether there's a .keep? It was said that the ebuild contains information on whether to create the .keep file - why not just use that information when uninstalling?
Hidden junk files are utterly annoying to me, and I hate the way most operating systems put some of them around - Mac <=9 was the worst I've come across. |
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8862 Location: beyond the rim
|
Posted: Tue Feb 08, 2005 12:39 am Post subject: |
|
|
| Lets just say there are technical reasons that aren't easy to fix (in a compatible way). |
|
| Back to top |
|
 |
supermihi Guru


Joined: 09 Feb 2005 Posts: 348
|
Posted: Fri Mar 04, 2005 8:31 pm Post subject: |
|
|
| Quote: | | A 0 bytes file takes an entry in the inodes table of your file system, and also is asigned one block, whose size demends on what you set it when you created the filesystem. |
You should consider using reiser4, which is more effective in using hard disc space with many very small files than with medium sized ones. Thus the .keep files could even increase the efficiency off your filesystem - maybe that's the magic reason for that files!
 _________________ "You may say I'm a dreamer, but I'm not the only one." |
|
| Back to top |
|
 |
assaf Tux's lil' helper


Joined: 14 Feb 2005 Posts: 146 Location: http://localhost
|
Posted: Tue Mar 22, 2005 9:19 am Post subject: |
|
|
Only guessing but in order to do that you'd have to check each and every one of the ebuilds to see if they use that specific dir, because it's enough that any one package uses this dir. That might slow things down a bit.
| g4c9z wrote: | Um, I'm wondering - wouldn't a better design be to query the ebuild when removing folders, to see whether the folder should be kept, instead of checking whether there's a .keep? It was said that the ebuild contains information on whether to create the .keep file - why not just use that information when uninstalling?
Hidden junk files are utterly annoying to me, and I hate the way most operating systems put some of them around - Mac <=9 was the worst I've come across. |
LOL vvvvv
| supermihi wrote: | ... Thus the .keep files could even increase the efficiency off your filesystem - maybe that's the magic reason for that files!
 |
|
|
| Back to top |
|
 |
drwook Veteran

Joined: 30 Mar 2005 Posts: 1322 Location: London
|
Posted: Mon May 23, 2005 12:23 pm Post subject: |
|
|
rofl, classic - I think we need this in portage, so the 'new' .keep files are automatically links rather than 'fresh' files. if it saves a couple of meg on a few thousand machines it might even not be a bad idea... stick a 'reference' .keep file in /usr/lib or somewhere & have them all symlinked to there at install time whenever a new one would have been created.
I'm worryingly close to being serious here, I mean it's not much but it is avoidable wastage... |
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8862 Location: beyond the rim
|
Posted: Mon May 23, 2005 12:48 pm Post subject: |
|
|
| You can't use hardlinks for this (as things can be spread across filesystems). |
|
| Back to top |
|
 |
drwook Veteran

Joined: 30 Mar 2005 Posts: 1322 Location: London
|
Posted: Mon May 23, 2005 3:55 pm Post subject: |
|
|
| Genone wrote: | | You can't use hardlinks for this (as things can be spread across filesystems). |
Didn't think of that... Guess you can't really get around that in any managable way (e.g. reference .keep being pointed to by an environment variable, 1 variable per HFS directory off the root, or a 'global' one?)
frikkin valid reasons...  |
|
| Back to top |
|
 |
matthies n00b


Joined: 12 Dec 2004 Posts: 16
|
Posted: Tue Jul 12, 2005 11:35 am Post subject: |
|
|
why the .keep?
portage automatically cleans up for you after unmerging packages, also removing empty unneeded directories. but some directories are vital to your system, and they are therefore protected from autmatic removal by having a zero length file there, .keep.
Honestly, if you're worried about disk-space, do this for a little perspective:
On my system, this uses up ~4G, meaning the .keep files are a whopping 0.025% of that (allowing for a generous 1M for the .keep files)
So I doubt you're using Gentoo if 1M diskspace wastage is giving you nightmares. And yes, it makes sense to have those 4G there if you have the diskspace, in case you're thinking about cleaning that up. Most of that diskspace is saved downloads (/usr/portage/distfiles), saving network bandwidth on the mirror servers if a simple patch has to be applied for a security fix or something else.
Another fun fact:
disregarding reiserfs tail packing, every file on your system is wasting on average half the block size... just do the math and be surprised...
reducing the block size will slow down your disk though - as will tail packing with reiser, so do you want more diskspace or a faster disk? TANSTAAFL  |
|
| Back to top |
|
 |
|