threads / discuss / 29585

Git, Builds, and Filesystem Type

Subject: Git, Builds, and Filesystem Type

## tl;dr

8 messages between Feb 9, 2012 and Feb 10, 2012.

replies: 7people: 2as markdown or json

Hilco Wijbenga· Feb 9, 2012, 21:23 UTC · lore
Hi all,

I'm thinking about trying out different filesystems over the weekend to see if, say, BTRFS or XFS is faster when using Git and running our build.

Currently, I'm using ReiserFS and it's not like it's not working. I'm very pleased with ReiserFS but after seeing talks about BTRFS and XFS I'm curious if another (newer) FS is better suited to our specific environment. Anything to make the build a little faster. :-)

For the record, our (Java) project is quite small. It's 43MB (source and images) and the entire directory tree after building is about 1.6GB (this includes all JARs downloaded by Maven). So we're not talking TBs of data.

Any thoughts on which FSs to include in my tests? Or simply which FS might be more appropriate?

Cheers, Hilco

Martin Fick· Feb 9, 2012, 21:53 UTC · re: Hilco Wijbenga · lore

Re: Git, Builds, and Filesystem Type

On Thursday, February 09, 2012 02:23:18 pm Hilco Wijbenga wrote:

Show 7 quoted lines
> For the record, our (Java) project is quite small. It's
> 43MB (source and images) and the entire directory tree
> after building is about 1.6GB (this includes all JARs
> downloaded by Maven). So we're not talking TBs of data.
> 
> Any thoughts on which FSs to include in my tests? Or
> simply which FS might be more appropriate?

tmpfs is probably fastest hands down if you can use it (even if you have to back it by swap).

-Martin
-- 
Employee of Qualcomm Innovation Center, Inc. which is a 
member of Code Aurora Forum
Hilco Wijbenga· Feb 9, 2012, 23:24 UTC · re: Martin Fick · lore

Re: Git, Builds, and Filesystem Type

On 9 February 2012 13:53, Martin Fick <mfick@codeaurora.org> wrote:
Show 12 quoted lines
> On Thursday, February 09, 2012 02:23:18 pm Hilco Wijbenga
> wrote:
>> For the record, our (Java) project is quite small. It's
>> 43MB (source and images) and the entire directory tree
>> after building is about 1.6GB (this includes all JARs
>> downloaded by Maven). So we're not talking TBs of data.
>>
>> Any thoughts on which FSs to include in my tests? Or
>> simply which FS might be more appropriate?
>
> tmpfs is probably fastest hands down if you can use it (even
> if you have to back it by swap).
I don't have quite that much RAM. :-)
Martin Fick· Feb 9, 2012, 23:34 UTC · re: Hilco Wijbenga · lore

Re: Git, Builds, and Filesystem Type

On Thursday, February 09, 2012 04:24:47 pm Hilco Wijbenga wrote:

> On 9 February 2012 13:53, Martin Fick 
<mfick@codeaurora.org> wrote:
Show 17 quoted lines
> > On Thursday, February 09, 2012 02:23:18 pm Hilco
> > Wijbenga
> > 
> > wrote:
> >> For the record, our (Java) project is quite small.
> >> It's 43MB (source and images) and the entire
> >> directory tree after building is about 1.6GB (this
> >> includes all JARs downloaded by Maven). So we're not
> >> talking TBs of data.
> >> 
> >> Any thoughts on which FSs to include in my tests? Or
> >> simply which FS might be more appropriate?
> > 
> > tmpfs is probably fastest hands down if you can use it
> > (even if you have to back it by swap).
> 
> I don't have quite that much RAM. :-)

But I am sure that you have that much disk space which you can allocate to swap, if not you already couldn't build it. And tmpfs swapping is still likely faster than a persistent FS (it will not need to block on syncs). If you are benchmarking, it is likely worth you effort since that will probably mark the upper performance bound,

-Martin
-- 
Employee of Qualcomm Innovation Center, Inc. which is a 
member of Code Aurora Forum
Hilco Wijbenga· Feb 10, 2012, 01:25 UTC · re: Martin Fick · lore

Re: Git, Builds, and Filesystem Type

On 9 February 2012 15:34, Martin Fick <mfick@codeaurora.org> wrote:
Show 28 quoted lines
> On Thursday, February 09, 2012 04:24:47 pm Hilco Wijbenga
> wrote:
>> On 9 February 2012 13:53, Martin Fick
> <mfick@codeaurora.org> wrote:
>> > On Thursday, February 09, 2012 02:23:18 pm Hilco
>> > Wijbenga
>> >
>> > wrote:
>> >> For the record, our (Java) project is quite small.
>> >> It's 43MB (source and images) and the entire
>> >> directory tree after building is about 1.6GB (this
>> >> includes all JARs downloaded by Maven). So we're not
>> >> talking TBs of data.
>> >>
>> >> Any thoughts on which FSs to include in my tests? Or
>> >> simply which FS might be more appropriate?
>> >
>> > tmpfs is probably fastest hands down if you can use it
>> > (even if you have to back it by swap).
>>
>> I don't have quite that much RAM. :-)
>
> But I am sure that you have that much disk space which you
> can allocate to swap, if not you already couldn't build it.
> And tmpfs swapping is still likely faster than a persistent
> FS (it will not need to block on syncs).  If you are
> benchmarking, it is likely worth you effort since that will
> probably mark the upper performance bound,

I found [1]. Is that sort of what you had in mind? That would be quite tricky. I have a group of some 60 projects, each with their own "target" directory which would have to be mounted on tmpfs. And the "target" directory is created by Maven, not by me. Not to mention that I shut down my computer at the end of the day. :-)

I think I would prefer a somewhat more persistent solution. I certainly have enough space for a very big swap partition. So the whole of ~/my-project would fit on tmpfs. I'm just not sure about making it persistent at the end of the day.

[1] http://code.google.com/p/chromium/wiki/LinuxFasterBuilds
Martin Fick· Feb 10, 2012, 02:08 UTC · re: Hilco Wijbenga · lore

Re: Git, Builds, and Filesystem Type

>I found [1]. Is that sort of what you had in mind
yes
Show 5 quoted lines
>That would be quite
>tricky. I have a group of some 60 projects, each with their own
>"target" directory which would have to be mounted on tmpfs. And the
>"target" directory is created by Maven, not by me. Not to mention that
>I shut down my computer at the end of the day. :-)
Sounds like a laptop?  Hibernate?
>I think I would prefer a somewhat more persistent solution. I
>certainly have enough space for a very big swap partition. So the
>whole of ~/my-project would fit on tmpfs. I'm just not sure about
>making it persistent at the end of the day.
Link your .git dir to a persistent location. 
Benchmark it first so you know how much hassle it may be worth.  If it isn't worth it, xfs or brtfs will likely not be worth it either,

-Martin Employee of Qualcomm Innovation Center,Inc. which is a member of Code Aurora Forum

Hilco Wijbenga· Feb 10, 2012, 04:04 UTC · re: Martin Fick · lore

Re: Git, Builds, and Filesystem Type

On 9 February 2012 18:08, Martin Fick <mfick@codeaurora.org> wrote:
Show 7 quoted lines
>>That would be quite
>>tricky. I have a group of some 60 projects, each with their own
>>"target" directory which would have to be mounted on tmpfs. And the
>>"target" directory is created by Maven, not by me. Not to mention that
>>I shut down my computer at the end of the day. :-)
>
> Sounds like a laptop?  Hibernate?

No, a regular desktop that I shut down every night. It makes quite a bit of noise and I would rather not waste power.

Show 6 quoted lines
>>I think I would prefer a somewhat more persistent solution. I
>>certainly have enough space for a very big swap partition. So the
>>whole of ~/my-project would fit on tmpfs. I'm just not sure about
>>making it persistent at the end of the day.
>
> Link your .git dir to a persistent location.

I don't think that would help all that much. I would still lose anything I had not committed or stashed. And I would still have to rebuild every day.

Perhaps something together with unionfs? I'll think about it.
Hilco Wijbenga· Feb 10, 2012, 01:11 UTC · lore

Re: Git, Builds, and Filesystem Type

On 9 February 2012 15:24, Luke Diamand <luke@diamand.org> wrote:
Show 26 quoted lines
> On Thu, Feb 9, 2012 at 9:23 PM, Hilco Wijbenga <hilco.wijbenga@gmail.com>
> wrote:
>>
>> Hi all,
>>
>> I'm thinking about trying out different filesystems over the weekend
>> to see if, say, BTRFS or XFS is faster when using Git and running our
>> build.
>>
>> Currently, I'm using ReiserFS and it's not like it's not working. I'm
>> very pleased with ReiserFS but after seeing talks about BTRFS and XFS
>> I'm curious if another (newer) FS is better suited to our specific
>> environment. Anything to make the build a little faster. :-)
>>
>> For the record, our (Java) project is quite small. It's 43MB (source
>> and images) and the entire directory tree after building is about
>> 1.6GB (this includes all JARs downloaded by Maven). So we're not
>> talking TBs of data.
>>
>> Any thoughts on which FSs to include in my tests? Or simply which FS
>> might be more appropriate?
>
>
> Do people still use reiserfs? I thought development on that pretty much
> stopped years ago. And reiser4 never made it into the kernel. Read the wiki
> page for why.

As I said, reiserfs works fine so I see no need to replace it. I'm not a big fan of ext3 (I've run out of inodes too many times) and I simply haven't tried ext4. Apparently, it has some architectural problems but I'm no expert.

> ext4, FTW!
>
> But whatever you use, you might find that the core.preloadindex config
> option helps. It certainly does for NFS.

I would like to think that my local hard drive has no latency issues? Would this really be worthwhile even if I do not use some sort of distributed FS?

← back to recent threads