2007-09-21 10:48:54

by Peter Stahlir

[permalink] [raw]
Subject: Git as a filesystem

Hi!

Is it possible/feasible to use git as a filesystem?
Like having git on top of ext3.

This way I could do a gitfs-gc and there is only one
pack file sitting on the disk which is a compressed
version of the whole system.
I am not interested in a version controlled filesystem,
only in the space saving aspects.

Thanks,

Peter


2007-09-21 11:28:02

by Muhammad Tayyab

[permalink] [raw]
Subject: Re: Git as a filesystem

Hi,
I think it would be a bad idea to use Git as a part of filesystem. If
someone wants to install it and use it, its his choice, but if we make
it the part of Filesystem, and just use it for compression, this will
reduce the performance.
For compression, i think more preferable is to make a patch for ext3
that implements the compression, like compression patch for ext2.

On the other hand I liked the idea that we can have a Git based file
system with special (non-standard) features. Why not provide the
features like repository and other Git features in normal file system.

Thanks,

-- Tayyab




Peter Stahlir wrote:
> Hi!
>
> Is it possible/feasible to use git as a filesystem?
> Like having git on top of ext3.
>
> This way I could do a gitfs-gc and there is only one
> pack file sitting on the disk which is a compressed
> version of the whole system.
> I am not interested in a version controlled filesystem,
> only in the space saving aspects.
>
> Thanks,
>
> Peter
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>

2007-09-21 11:37:43

by Peter Stahlir

[permalink] [raw]
Subject: Re: Git as a filesystem

> Peter Stahlir wrote:
> > Hi!
> >
> > Is it possible/feasible to use git as a filesystem?
> > Like having git on top of ext3.
> >
> > This way I could do a gitfs-gc and there is only one
> > pack file sitting on the disk which is a compressed
> > version of the whole system.
> > I am not interested in a version controlled filesystem,
> > only in the space saving aspects.


2007/9/21, Muhammad Tayyab <[email protected]>:
> Hi,
> I think it would be a bad idea to use Git as a part of filesystem. If
> someone wants to install it and use it, its his choice, but if we make
> it the part of Filesystem, and just use it for compression, this will
> reduce the performance.
> For compression, i think more preferable is to make a patch for ext3
> that implements the compression, like compression patch for ext2.

As I understand it the compression patches for ext2 only compress
a single file. I think gitfs would compress much better because it
deltifies between all files. So if you are not interested in
performance but space
efficiency a gitfs would be nice.

Peter

P.S.: I was told that there exists a fuse based gitfs at
http://www.sfgoth.com/~mitch/linux/gitfs/
But I think our goals differ.

files.

2007-09-21 11:46:22

by Peter Stahlir

[permalink] [raw]
Subject: Re: Git as a filesystem

For example, imagine running a complete Debian mirror on top of a
Debian system with gitfs. How big would the packfile be for this 252GB
beast?

Peter

2007-09-21 12:51:20

by Jan Engelhardt

[permalink] [raw]
Subject: Re: Git as a filesystem


On Sep 21 2007 13:46, Peter Stahlir wrote:
>
>For example, imagine running a complete Debian mirror on top of a
>Debian system with gitfs. How big would the packfile be for this 252GB
>beast?

Probably 252 GB. Lots of the packages are already compressed, and
each time a minimal change is done, the bytestream changes, so long
story short, deltifying between to compressed streams is likely to
deltify horribly.

2007-09-21 13:30:30

by Peter Stahlir

[permalink] [raw]
Subject: Re: Git as a filesystem

> >For example, imagine running a complete Debian mirror on top of a
> >Debian system with gitfs. How big would the packfile be for this 252GB
> >beast?
>
> Probably 252 GB. Lots of the packages are already compressed, and
> each time a minimal change is done, the bytestream changes, so long
> story short, deltifying between to compressed streams is likely to
> deltify horribly.

What about adding deb or tar support to git?
Then git doesn't store deb archives but the contents of archives.
This way redundancy across architectures can be deltified.

2007-09-21 13:53:32

by Jan Engelhardt

[permalink] [raw]
Subject: Re: Git as a filesystem


On Sep 21 2007 15:30, Peter Stahlir wrote:
>
>> >For example, imagine running a complete Debian mirror on top of a
>> >Debian system with gitfs. How big would the packfile be for this 252GB
>> >beast?
>>
>> Probably 252 GB. Lots of the packages are already compressed, and
>> each time a minimal change is done, the bytestream changes, so long
>> story short, deltifying between to compressed streams is likely to
>> deltify horribly.
>
>What about adding deb or tar support to git?

Blatant layering violation.

>Then git doesn't store deb archives but the contents of archives.

And waht about metadata (e.g. rpm Vendor: tag)? tar does not store that.

>This way redundancy across architectures can be deltified.

Not at all. Different instruction sets, different codes ==> delta -> 0.
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>

2007-09-21 15:04:42

by Adrian Bunk

[permalink] [raw]
Subject: Re: Git as a filesystem

On Fri, Sep 21, 2007 at 01:37:33PM +0200, Peter Stahlir wrote:
> > Peter Stahlir wrote:
> > > Hi!
> > >
> > > Is it possible/feasible to use git as a filesystem?
> > > Like having git on top of ext3.
> > >
> > > This way I could do a gitfs-gc and there is only one
> > > pack file sitting on the disk which is a compressed
> > > version of the whole system.
> > > I am not interested in a version controlled filesystem,
> > > only in the space saving aspects.
>
>
> 2007/9/21, Muhammad Tayyab <[email protected]>:
> > Hi,
> > I think it would be a bad idea to use Git as a part of filesystem. If
> > someone wants to install it and use it, its his choice, but if we make
> > it the part of Filesystem, and just use it for compression, this will
> > reduce the performance.
> > For compression, i think more preferable is to make a patch for ext3
> > that implements the compression, like compression patch for ext2.
>
> As I understand it the compression patches for ext2 only compress
> a single file. I think gitfs would compress much better because it
> deltifies between all files. So if you are not interested in
> performance but space
> efficiency a gitfs would be nice.

git is kewl, so it must be the solution for all problems?

git keeps information of all versions of a file.
This can by definition not be smaller than only storing the current
version.

And git doesn't perform any magic, it uses the zlib library that is
neither unusual nor the best compression method available.

> Peter
>...

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed