All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@inwind.it>
To: Martin Steigerwald <Martin@lichtvoll.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: speeding up slow btrfs filesystem
Date: Sat, 17 Dec 2011 13:50:10 +0100	[thread overview]
Message-ID: <2297283.SPUU0GRYgu@venice> (raw)
In-Reply-To: <201112171254.47334.Martin@lichtvoll.de>

On Saturday, 17 December, 2011 12:54:47 you wrote:
[...]
>=20
> This reminds me of the delayed allocation discussion as Ext4 introduc=
ed
> that feature.
>=20
> Ext3/4 developer Theodore T=B4so  said if the applications are not us=
ing
> fsync() its their fault. But before OTOH applications began to avoid =
using
> fsync() since it has had serious performance drawbacks on ext3 (not e=
xt4)
> with data=3Dordered.
>=20
> Ext4 now has workarounds for the rename and truncate cases, after Lin=
us
> requested boldly to not break existing userspace.

IIRC the problem was data loss. Instead you was blaming (correctly) a s=
lowness=20
problem. Are two very different problem.

> Now applications that use fsync() the way Theodore T=B4so and other s=
ee it
> correctly used should now skip the fsync() on a BTRFS?

I never say to not use the fsync() call. I am only arguing that for a p=
ackage=20
manager the fsync() call is not the best API.=20

The package manager were designed with capabilities of the old file-sys=
tems in=20
mind. At the time the sync(2) API was the only available.
With this API it is impossible to have an atomic upgrade (all or nothin=
g) of a=20
package.=20

With the new filesystems (BTRFS and ZFS ), the package manager have mor=
e=20
options. They can create a snapshot at the beginning (of the old filesy=
stem)=20
and rollback if something goes wrong (I am simplifying a bit) . But the=
=20
package manager have to be updated.

As bonus you can avoid to use sync(2) which has performance drawbacks=20
(specially with BTRFS).

=20
[...]


>=20
> > Using the snapshot during an upgrade open a lot of possibility whic=
h
> > are not allowed with EXT4. With snapshot you can always go back if
> > during an upgrade if something goes wrong (like strange packages
> > dependencies). Or you can have the previous configuration to go bac=
k
> > in case of trouble.
>=20
> Adding new possibilities is one thing. And supporting snapshots prope=
rly
> would depend on some support side from the applications. I think that
> using snapshots for upgrades is a good idea.
>=20
> But OTOH I think that BTRFS should not break or slow down existing
> userspace. I think that existing approaches like using fsync() like
> according to quite some filesystem developers it should be used shoul=
d
> continue to work nicely.

Nobody wants to slowdown the application. But the life is full of compr=
omises.
If you want the speed of ext4, you can use ext4. If you want the snapsh=
ot=20
capability and the COW guarantee you can use BTRFS, but you have some=20
slowness.

Of course the best would be have the speed of the ext4 with the capabil=
ities=20
of btrfs.... :-) Unfortunately today this is not available.

[....]


>=20
> Thanks,
Regards
--=20
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack@inwi=
nd.it>
Key fingerprint =3D 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-12-17 12:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-17 11:54 speeding up slow btrfs filesystem Martin Steigerwald
2011-12-17 12:02 ` Martin Steigerwald
2011-12-17 12:50 ` Goffredo Baroncelli [this message]
2011-12-17 16:10   ` Martin Steigerwald
  -- strict thread matches above, loose matches on Subject: below --
2011-12-16 17:51 Martin Steigerwald
2011-12-16 17:54 ` Martin Steigerwald
2011-12-16 18:38   ` Goffredo Baroncelli
2011-12-16 19:53     ` Martin Steigerwald
2011-12-16 20:58       ` Martin Steigerwald
2011-12-17  7:03         ` Sergei Trofimovich
2011-12-17 11:09           ` Martin Steigerwald
2011-12-17 11:26             ` Hugo Mills
2011-12-17 11:38               ` Martin Steigerwald
2011-12-17 11:45                 ` Hugo Mills
2011-12-17 11:57                   ` Martin Steigerwald
2011-12-17 16:35                   ` Martin Steigerwald
2011-12-17 17:27                     ` Hugo Mills
2011-12-17 11:39       ` Goffredo Baroncelli
2011-12-18 18:41     ` Andrea Gelmini
2011-12-20 19:46       ` Goffredo Baroncelli
2011-12-17 11:11 ` Chris Samuel
2011-12-17 12:00   ` Martin Steigerwald
2011-12-17 12:42     ` David McBride
2011-12-17 16:14       ` Martin Steigerwald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2297283.SPUU0GRYgu@venice \
    --to=kreijack@inwind.it \
    --cc=Martin@lichtvoll.de \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.