public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* writing a plugin for reiserfs compression
@ 2001-11-01 17:14 Roy Sigurd Karlsbakk
  2001-11-01 20:07 ` Andreas Dilger
  2001-11-01 22:54 ` Hans Reiser
  0 siblings, 2 replies; 14+ messages in thread
From: Roy Sigurd Karlsbakk @ 2001-11-01 17:14 UTC (permalink / raw)
  To: reiser, linux-kernel

hi

I got this idea the other day...

Novell NetWare has a feature I really like. It's a file compression
feature they've been having since version 4.0 (or 4.10) of the OS.

- Once a day, a job is run to compress all files that havent been touched
within <n> days - default 14, that have not been flagged CAN'T COMPRESS
or DON'T COMPRESS (see below).

- After the file is compressed, it's checked against the compression
gain. If this is less than <n> per cent (default 30), the compressed
version is being deleted and the file is flagged CAN'T COMPRESS. If the
file is compressed, the uncompressed version is being deleted and the file
is flagged COMPRESSED.

- When a compressed file is accessed, it'll be decompressed on the fly and
flagged ACCESSED AFTER COMPRESSION. The next time it's accessed within the
given <n> days (above), it's decompressed and the compressed file
discarded. The flag COMPRESSED is cleared.

Files can be flagged 'DON'T COMPRESS' and 'FORCE COMPRESS' manually by the
user or admin. 'FORCE COMPRESS' is dominant over 'CAN'T COMPRESS'.

The result is that you're saving loads of space (typically 50-70% on a
netware file server) and, since the compression job is batched up
(typically by night), the performance penalty is minimal. File
decompression will happen quite rarely, as only the least-accessed files
are compressed.

TODO:
New attributes must be added somehow. 'ls' and 'find' and perhaps other
files must be modified to take advantage of this. The compression job can
be a simple script with something like

	find . -type f ! --compressed ! --dont-compress / -exec fcomp {} \;

(and check can't compress and force compression).

There must be a way to access the compressed files directly to make
backups more efficient - backing up already compressed files's a good
thing.

COMMENT:
And yes - I know a lot of people are saying this is something we don't
need, as diskspace doesn't cost anything today compared to what it used
to. The first time I heard that, was in '92. We're always using too much
diskspace!

Please cc: to me as I'm not on the list

roy
---
Praktiserende dyslektiker.
La ikke ortografiske krumspring skygge for
intensjonen bak denne fremstilling.


^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: writing a plugin for reiserfs compression
@ 2001-11-01 20:17 Roy Sigurd Karlsbakk
  2001-11-01 21:14 ` Andreas Dilger
  2001-11-09 23:27 ` Andreas Dilger
  0 siblings, 2 replies; 14+ messages in thread
From: Roy Sigurd Karlsbakk @ 2001-11-01 20:17 UTC (permalink / raw)
  To: adilger; +Cc: reiser, linux-kernel

Andreas Dilger (adilger@turbolabs.com) wrote*: 
>
>On Nov 01, 2001  18:14 +0100, Roy Sigurd Karlsbakk wrote:
>> Novell NetWare has a feature I really like. It's a file compression
>> feature they've been having since version 4.0 (or 4.10) of the OS.
>
>Yes, there is a patch for ext2 that does this as well.

ok...

I just thought there was a patch doing windows nt-like 
compress-em-all-realtime-and-get-doomed!

>> New attributes must be added somehow. 'ls' and 'find' and perhaps other
>> files must be modified to take advantage of this. The compression job can
>> be a simple script with something like
>>
>>  find . -type f ! --compressed ! --dont-compress / -exec fcomp {} \;
>>
>> (and check can't compress and force compression).

There already exists a patch for reiserfs which uses the same interface
to file attributes that ext2 and ext3 use.

ok? with batched compression?

>Also, ext2 already has a "compressed", "do not compress", and "dirty"
>attributes.  They are currently not all user modifyable for ext2
>filesystems via chattr/lsattr, but that doesn't mean they cannot be
>on reiserfs.
>
>> There must be a way to access the compressed files directly to make
>> backups more efficient - backing up already compressed files's a good
>> thing.
>
>Yes, there is also such an attribute for "raw" access I think.
>
>Making the user-space interface and tools as compatible as possible is
>a good thing, IMHO, just like "ls", "cp", etc all work regardless of
>the underlying filesystem.

yes, but it's kinda nice to have some way of checking a file's attributes for a 
sysadmin...

>As a note to whoever at namesys created the reiserfs patch to add the
>"notail" flag (overloading the "nodump" flag).  I would much rather
>that a new "notail" flag be allocated for this.  I will contact Ted
>Ted Ts'o to get a flag assigned.  This will avoid any problems in the
>future, and may also be useful at some time for ext2.

Do you think the other flags I mentioned may be useful?

roy

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2001-11-09 23:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-01 17:14 writing a plugin for reiserfs compression Roy Sigurd Karlsbakk
2001-11-01 20:07 ` Andreas Dilger
2001-11-01 23:01   ` Hans Reiser
2001-11-01 23:09   ` Hans Reiser
2001-11-02  9:29   ` Nikita Danilov
2001-11-01 22:54 ` Hans Reiser
  -- strict thread matches above, loose matches on Subject: below --
2001-11-01 20:17 Roy Sigurd Karlsbakk
2001-11-01 21:14 ` Andreas Dilger
2001-11-01 21:27   ` Roy Sigurd Karlsbakk
2001-11-01 21:37     ` Padraig Brady
2001-11-01 21:43       ` Roy Sigurd Karlsbakk
2001-11-02  9:24         ` Robert Varga
2001-11-01 23:16     ` Hans Reiser
2001-11-09 23:27 ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox