Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New tunable parameters #1562

Closed
wants to merge 1 commit into from
Closed

New tunable parameters #1562

wants to merge 1 commit into from

Conversation

imp
Copy link
Contributor

@imp imp commented Jul 2, 2013

While the new tunables are not intended for day-to-day tweak, it is the question of parity with Illumos - if the need to tinker with these variable ever arise the Linux way of doing so is module parameter.

Commit 55d85d5 (backport of the upstream changes)
replaced three hardcoded constants:

#define SYNC_PASS_DEFERRED_FREE 2 /* defer frees after this pass */
#define SYNC_PASS_DONT_COMPRESS 4 /* don't compress after this pass */
#define SYNC_PASS_REWRITE       1 /* rewrite new bps after this pass */

with a tunable parameters:

int zfs_sync_pass_deferred_free = 2; /* defer frees starting in this pass */
int zfs_sync_pass_dont_compress = 5; /* don't compress starting in this pass */
int zfs_sync_pass_rewrite = 2;       /* rewrite new bps starting in this pass */

This commit makes these tunables available as module parameters in Linux.

Commit 55d85d5 (backport of the upstream changes)
replaced three hardcoded constants:

    #define SYNC_PASS_DEFERRED_FREE 2 /* defer frees after this pass */
    #define SYNC_PASS_DONT_COMPRESS 4 /* don't compress after this pass */
    #define SYNC_PASS_REWRITE       1 /* rewrite new bps after this pass */

with a tunable parameters:

    int zfs_sync_pass_deferred_free = 2; /* defer frees starting in this pass */
    int zfs_sync_pass_dont_compress = 5; /* don't compress starting in this pass */
    int zfs_sync_pass_rewrite = 2;       /* rewrite new bps starting in this pass */

This commit makes these tunables available as module parameters in Linux.
@behlendorf
Copy link
Contributor

@imp I thought about this when originally porting the patch but opted against it at the time because changing these values can lead to pathological performance issues. This isn't the sort of thing anyone but a ZFS developer should be tinkering with. On Illumos the story is a little different because the change these values you would need to use mdb, but on Linux it's a lot easier. That said, we already expose some other knobs which are dangerous so perhaps this is OK. Have you been investigating changing these values?

@imp
Copy link
Contributor Author

imp commented Jul 2, 2013

@behlendorf I trip over this while investigating something else at zio.c. I initially wrote this patch with intention to play with these tunables, but than the need disappeared. The patch sat in my queue for some time until a periodic git repo clean up. At that point I decided it is better to offer it upstream than remove it.
I totally agree with you that these variables are not for casual consumption. However, if the need to tweak ever arise - it would be a shame to have to recompile the code.
I leave it for you to decide whether to merge it or not. If not I'll leave this branch here just in case.

@behlendorf behlendorf closed this in 29dee3e Jul 2, 2013
unya pushed a commit to unya/zfs that referenced this pull request Dec 13, 2013
Commit 55d85d5 (backport of
the upstream changes) replaced three hardcoded constants:

    #define SYNC_PASS_DEFERRED_FREE 2 /* defer frees after this pass */
    #define SYNC_PASS_DONT_COMPRESS 4 /* don't compress after this pass */
    #define SYNC_PASS_REWRITE       1 /* rewrite new bps after this pass */

with a tunable parameters:

    int zfs_sync_pass_deferred_free = 2; /* defer frees starting in this pass */
    int zfs_sync_pass_dont_compress = 5; /* don't compress starting in this pass */
    int zfs_sync_pass_rewrite = 2;       /* rewrite new bps starting in this pass */

This commit makes these tunables available as module parameters
in Linux.  They should only be used for performance analysis
because changing them can result in subtle and pathological
performance problems.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#1562
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants