From: Andreas Rohner <andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
To: Vyacheslav Dubeyko <slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 0/5] nilfs-utils: skip inefficient gc operations
Date: Thu, 23 Jan 2014 19:12:46 +0100 [thread overview]
Message-ID: <52E15B9E.6040307@gmx.net> (raw)
In-Reply-To: <85EBEC6B-CA69-472A-8DDD-8E056F809EC4-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
On 2014-01-23 18:48, Vyacheslav Dubeyko wrote:
>
> On Jan 21, 2014, at 4:59 PM, Andreas Rohner wrote:
>
>> Hi,
>>
>> This is the second version of this patch set. It replaces the kind of
>> hacky use of v_flags with a proper implementation of
>> NILFS_IOCTL_SET_SUINFO ioctl.
>>
>> v1->v2
>> * Implementation of NILFS_IOCTL_SET_SUINFO
>> * Added mc_min_free_blocks_threshold config option
>> (if clean segments < min_clean_segments)
>> * Added new command line param for nilfs-clean
>> * Update man- and config-files
>> * Simpler benchmark
>
> If you are talking about something then it should be in patchset.
> Otherwise, why do you mention about it?
>
>> This patch set implements a small new feature and there shouldn't be
>> any compatibility issues. It enables the GC to check how much free
>> space can be gained from cleaning a segment and if it is less than a
>> certain threshold it will abort the operation and try a different
>> segment.
>
> When you have cleaned a segment then you can use the whole one.
> So, if segment has 8 MB in size then it will be available 8 MB free space.
> The phrase "It enables the GC to check how much free space can be gained
> from cleaning a segment" really confuses me. Because I always know
> how much space I gain after cleaning every segment. I suppose that you
> mean something different. Am I correct?
You have to move the live blocks to a new segment, so you gain only (8
MB - live_blocks) of free space.
>> Although no blocks need to be moved, the SUFILE entry of the
>> corresponding segment needs to be updated to avoid an infinite loop.
>>
>> This is potentially useful for all gc policies, but it is especially
>> beneficial for the timestamp policy.
>
> I completely misunderstand this statement. What do you mean?
Well the timestamp policy always selects the oldest segment. If the
oldest segment is below the threshold it won't be cleaned. If we don't
change the timestamp it will be immediately selected again and it
probably will still be below the threshold and so on in an infinite loop.
>> Lets assume for example a NILFS2
>> volume with 20% static files and lets assume these static files are in
>> the oldest segments. The current timestamp policy will select the oldest
>> segments and, since the data is static, move them mostly unchanged to
>> new segments. After a while they will become the oldest segments again.
>> Then timestamp will move them again. These moving operations are
>> expensive and unnecessary.
>>
>> I used a simple benchmark to test the patch set (only a few lines of C).
>> I used a 100 GB partition and performed the following steps:
>>
>> 1. Write a 20 GB file
>> 2. Write a 50 GB file
>> 3. Overwrite chunks of 1 MB within the 50 GB file at random
>> 4. Repeat step 3 until 60 GB of data is written
>>
>> Steps 3 and 4 are only perfomed to get the GC started. So the benchmark
>> writes a 130 GB in total to a 100 GB partition.
>
> How is it possible to save 130 GB in 100 GB partition? Are you magician? :)
I OVERWRITE the 50 GB file. 130 GB is the total amount of data written
to the partition.
>>
>> HHD:
>> Timestamp GB Written: 340.7574
>> Timestamp GB Read: 208.2935
>> Timestamp Runtime: 7787.546s
>>
>> Patched GB Written: 313.2566
>> Patched GB Read: 182.6389
>> Patched Runtime: 7410.892s
>>
>> SSD:
>> Timestamp GB Written: 679.3901
>> Timestamp GB Read: 242.59
>> Timestamp Runtime: 3022.081s
>>
>> Patched GB Written: 500.0095
>> Patched GB Read: 157.475
>> Patched Runtime: 2313.448
>>
>> The results for the HDD clearly show, that about 20 GB less data has
>> been written and read in the patched version. It is reasonable to
>> assume, that these 20 GB are the static data.
>>
>> The speed of the GC was tuned to the HDD. It was probably too aggressive
>> for the much faster SSD. That is probably the reason why the difference
>> in GB written and read is much higher than 20 GB.
>
> I misunderstand completely what you mean here.
You need to be a bit more specific. These are the results of my
benchmark. The GB Written and GB Read values are calculated by simply
importing /proc/diskstats into R (You subtract the values before the
benchmark from those after the benchmark).
The patched version writes less and reads less. Pretty simple.
br,
Andreas Rohner
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-01-23 18:12 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 13:59 [PATCH v2 0/5] nilfs-utils: skip inefficient gc operations Andreas Rohner
[not found] ` <cover.1390310509.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-21 13:59 ` [PATCH v2 1/5] nilfs-utils: cldconfig add an option to set minimal free blocks Andreas Rohner
[not found] ` <22b5b3ac403052d3044dc8c1bebe323191376c03.1390310509.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-21 14:10 ` dexen deVries
2014-01-21 14:38 ` Andreas Rohner
2014-01-21 14:53 ` Andreas Rohner
2014-01-23 17:49 ` Vyacheslav Dubeyko
[not found] ` <B1FCAEBD-EB58-4A06-BD6B-7D4FB533D9F1-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2014-01-23 18:31 ` Andreas Rohner
2014-01-21 13:59 ` [PATCH v2 2/5] nilfs-utils: cleanerd: add custom error value to enable fast retry Andreas Rohner
[not found] ` <e9d3dd17318a994fe7e2c100368212e0b4029e13.1390310509.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-23 17:49 ` Vyacheslav Dubeyko
[not found] ` <FE7FB751-68F4-48C3-A97A-782F4F6E69FE-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2014-01-23 19:08 ` Andreas Rohner
2014-01-21 13:59 ` [PATCH v2 3/5] nilfs-utils: refactoring of nilfs_reclaim_segment to add minblocks param Andreas Rohner
[not found] ` <36ef66ee15b3de8ca00815a6baa7bf6b62ca57d4.1390310509.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-24 18:04 ` Ryusuke Konishi
2014-01-21 13:59 ` [PATCH v2 4/5] nilfs-utils: add support for NILFS_IOCTL_SET_SUINFO ioctl Andreas Rohner
[not found] ` <72f8c37258d08ba9793b0c1bb0374dd8efcd4756.1390310509.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-23 17:49 ` Vyacheslav Dubeyko
[not found] ` <62FA32DB-83AC-4570-BD73-618C169390FE-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2014-01-23 19:17 ` Andreas Rohner
[not found] ` <52E16AE4.4000303-hi6Y0CQ0nG0@public.gmane.org>
2014-01-25 16:16 ` Vyacheslav Dubeyko
2014-01-24 18:26 ` Ryusuke Konishi
[not found] ` <20140125.032633.184837411.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-01-24 20:00 ` Andreas Rohner
[not found] ` <52E2C643.3070704-hi6Y0CQ0nG0@public.gmane.org>
2014-01-25 18:52 ` Ryusuke Konishi
2014-01-26 10:00 ` Ryusuke Konishi
[not found] ` <20140126.190004.443429632.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-01-26 11:24 ` Andreas Rohner
2014-01-21 13:59 ` [PATCH v2 5/5] nilfs-utils: man: add description of min_free_blocks_threshold Andreas Rohner
2014-01-21 14:00 ` [PATCH v2 1/3] nilfs2: add new nilfs_suinfo_update struct Andreas Rohner
[not found] ` <cec6a449ddf5ae9da2928cdddfb96ebcb2789eee.1390312777.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-21 14:00 ` [PATCH v2 2/3] nilfs2: add nilfs_sufile_set_suinfo to update segment usage info Andreas Rohner
[not found] ` <2fd48b2d524a59a02bdad13c0c194de3e5b55cc7.1390312777.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-24 11:56 ` Ryusuke Konishi
[not found] ` <20140124.205623.400541300.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-01-24 12:34 ` Andreas Rohner
[not found] ` <52E25DDC.2060502-hi6Y0CQ0nG0@public.gmane.org>
2014-01-24 16:34 ` Ryusuke Konishi
2014-01-21 14:00 ` [PATCH v2 3/3] nilfs2: implementation of NILFS_IOCTL_SET_SUINFO ioctl Andreas Rohner
[not found] ` <6fb5a6d45afca9ae2599c471c0e42805ed1b6c55.1390312777.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-01-24 13:20 ` Ryusuke Konishi
[not found] ` <20140124.222016.110509397.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-01-24 13:44 ` Andreas Rohner
[not found] ` <52E26E46.3030702-hi6Y0CQ0nG0@public.gmane.org>
2014-01-24 15:23 ` Ryusuke Konishi
2014-01-24 4:56 ` [PATCH v2 1/3] nilfs2: add new nilfs_suinfo_update struct Ryusuke Konishi
[not found] ` <20140124.135635.27780504.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-01-24 12:11 ` Andreas Rohner
[not found] ` <52E25883.3010307-hi6Y0CQ0nG0@public.gmane.org>
2014-01-24 12:37 ` Ryusuke Konishi
2014-01-22 23:46 ` [PATCH v2 0/5] nilfs-utils: skip inefficient gc operations Michael L. Semon
[not found] ` <52E05863.90604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-23 10:25 ` Andreas Rohner
[not found] ` <52E0EE08.3040703-hi6Y0CQ0nG0@public.gmane.org>
2014-01-23 20:57 ` Michael L. Semon
2014-01-23 17:48 ` Vyacheslav Dubeyko
[not found] ` <85EBEC6B-CA69-472A-8DDD-8E056F809EC4-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2014-01-23 18:12 ` Andreas Rohner [this message]
[not found] ` <52E15B9E.6040307-hi6Y0CQ0nG0@public.gmane.org>
2014-01-24 8:02 ` Vyacheslav Dubeyko
[not found] ` <FC7F25C5-1E72-4DF5-B860-FBCE36E91EAB-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2014-01-24 14:18 ` Andreas Rohner
[not found] ` <52E27651.6070207-hi6Y0CQ0nG0@public.gmane.org>
2014-01-25 16:33 ` Vyacheslav Dubeyko
[not found] ` <82ACC3FC-BE83-483F-99D8-D13F4D02C58F-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2014-01-26 6:57 ` Ryusuke Konishi
[not found] ` <20140126.155740.56352351.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-01-26 10:36 ` Andreas Rohner
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=52E15B9E.6040307@gmx.net \
--to=andreas.rohner-hi6y0cq0ng0@public.gmane.org \
--cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.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.