Results 1 to 4 of 4

Thread: opensuse 12.1, btrfs and snapper cron jobs

  1. #1

    Default opensuse 12.1, btrfs and snapper cron jobs

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    For a while now I've been enjoying my upgrade to OpenSUSE 12.1 from
    11.3, and my transition to KDE from Gnome. Quirks certainly exist, but
    for the most part it has been good. The biggest apprehension overall
    was the switch from my trusted filesystems (XFS/ext4) to the new wonder
    known as btrfs. As far as I know I have not lost any data, though I've
    been pretty crazy about backups just in case something went wrong.

    For the past couple of weeks the biggest concern I've had has been
    related to my lousy hard drive. I have a Latitude E6410 which has been
    a decent laptop for the most part, but as it is a laptop with a spinning
    drive the disk I/O is basically terrible. I can't fix, that, and I've
    had this same laptop for a couple of years running 11.3 without much
    pain, so probably not related to what I'm seeing now. So what am I
    seeing? Basically, I suspect my disk is killing me and my ability to
    work on the system. Simple things like changing workspaces/desktops
    stalls when this happens. Changing tabs in browsers also slows down, as
    down switching between application. Typically when this happens my hard
    drive light is steadily on. I run 'top' 24x7 in a shell so I can catch
    pestilences as quickly as possible and my processor is not usually be
    worked hard at this time (Core i7 something or another, 8 GB RAM, not
    usually pushing these resources overly hard). In the same display,
    though, the %wa (waiting on I/O I believe) is high at these times.
    Normally this is sitting at 0.0, maybe jumping up into the log
    percentages from time to time. It bounces around as I do I/O-intensive
    stuff, of course, but it seems to be happening a lot more now when I do
    not expect it.

    This morning @ 0800 I was working along and suddenly everything went
    into super-sluggish mode. The hard drive light was on (for ten to
    fifteen MINUTES), and snapper was running, which surprised me a little.
    I had, about five minutes earlier, installed a new package (updated
    wireshark from an OBS repository). The process list showed this had
    started from cron, which was interesting. The snapper process had
    started @ 0800 on its own which was pretty terrible timing for me since
    it's in the middle of my workday. Poking around in cron I found the
    following files:

    /etc/cron.daily/suse.de-snapper
    /etc/cron.hourly/suse.de-snapper

    Investigating further it appears that snapper is trying to do some
    optimization regularly. The daily cron job tries to do three types of
    jobs (depending on the snapper configuration per btrfs volume, which I
    have not tuned/touched at all so far) including 'NUMBER_CLEANUP',
    'TIMELINE_CLEANUP', and 'EMPTY_PRE_POST_CLEANUP'. The hourly job only
    tries to do the 'TIMELINE_CLEANUP'. After seeing this I decided to see
    what kind of snapshots I had since I have not created any manually:

    sudo snapper list

    It turns out I have quite a few. It's exciting to know that Yast in
    particular is taking snapshots of stuff as I use it which could be great
    for rolling back stuff when I really screw up. On the other hand, I
    suspect that the cleanup being done to remove empty snapshots is causing
    my system to behave badly. One of the processes I regularly see when my
    box is sluggish is named compare-dirs. I have not known for sure if it
    was for some kind of desktop search indexing or if it was related to
    btrfs, but looking now it resides in /usr/lib/snapper/bin/compare-dirs
    which makes that clear. I suspect that part of the cleanup being done
    involves compare-dirs going through and looking for things that may or
    may not have changed and then doing some action based on that, but with
    my laptop's lame hard drive this is impacting my regular work. Running
    the 3.x kernel I kind of hoped doing simultaneous tasks would behave a
    little better, but that brings me to my point (finally!).

    Do I need/want snapper working as often as it does? Sure, more
    snapshots could mean more-granular restores when I break things, but I
    am usually interested in performance more than the possible for granular
    restores (I backup aggressively on my own). Does anybody know which of
    these snapper operations is safest to disable and for which volumes?
    Anybody with experience tuning these jobs? Any practices I can adopt to
    minimize the impact of snapshots in general?

    As a last note, when I setup my machine I did not partition /home
    separately from the rest of the box (I think I made an error in that...
    usually I've wanted all of my disk space to be available to me in both
    /home as well as the rest of the filesystem so I just kept them
    together; it appears btrfs can maybe handle this differently which
    requires a bit of rethinking on my part). I suspect that this means my
    snapshots are bigger than they need to be due to all of the changes in
    my home directory (the only thing I care about in a disaster recovery
    situation and which I already backup).

    Any input is appreciated.

    AB

    P.S. Just noticed the "System stalling" thread from a couple minutes
    ago.... possibly related.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.18 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJPddR7AAoJEF+XTK08PnB5At0QAJZB7MrHaTEgaEYmq6S3wQmP
    uq9GyLfjNIAZKUfwTg4v7ysJyg0Ykt2bi16GapKhgQ5QDabQ52kJEAH3QjcHW1Ac
    nvHujzsbozE/oMyQlLwIOnw5V4QVF+T3FZZCFv1v2OflSczJ/29IZz8HTZlVKhZu
    ZBv8iFLtEwKnqDw5wc5AT8MwbvJmptv6YL6ygnFFW9AGt7M3HWe4OqFpyK2cGgD7
    nC199um5eq/GizHQHuxE5pONJbS9F0Fz7J38HRoQyVbft4TG70O2y3x5d4zfsa1z
    2g1Ak8rgrBfWc4ZdYaOvQtPCzCb6vXTOXgzk1Oz5TmPe6EVnAIsDtGm3u5G4s+8j
    ykglKbQBIUnRLt7Ov/puSMCgk4n2ROLy0U2cX8/CpQnfXXHgAHdoH63upCPho3ra
    VVYgTYdzySaJuFdrFIY/rlNYbAyciZtc2cJ31xMALhMfalxbMY8BA7OMQDMsvvqG
    CN+qa9m7hD4MtZkU9UkJ1dmIMLhLCZV/oQZgGStQUFBSJ8eUgXQ9IU3wPfD1TEmk
    p320jhjkjeBrTdOf5Rdbf5re/+7RG6O32u75DJe3b13+vGSkr7dEDO9SdvnfFVNi
    bG0YDpAVpjj8A1cyDz0PwRVXXsqcUfp7s6Mxqlvv8jxjRSUeD7Pum4EExt5QHzn+
    4ly4umhNjwGjZlGltGwT
    =Zi6X
    -----END PGP SIGNATURE-----

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,644
    Blog Entries
    15

    Default Re: opensuse 12.1, btrfs and snapper cron jobs

    Quote Originally Posted by ab
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    For a while now I've been enjoying my upgrade to OpenSUSE 12.1 from
    11.3, and my transition to KDE from Gnome. Quirks certainly exist, but
    for the most part it has been good. The biggest apprehension overall
    was the switch from my trusted filesystems (XFS/ext4) to the new wonder
    known as btrfs. As far as I know I have not lost any data, though I've
    been pretty crazy about backups just in case something went wrong.

    For the past couple of weeks the biggest concern I've had has been
    related to my lousy hard drive. I have a Latitude E6410 which has been
    a decent laptop for the most part, but as it is a laptop with a spinning
    drive the disk I/O is basically terrible. I can't fix, that, and I've
    had this same laptop for a couple of years running 11.3 without much
    pain, so probably not related to what I'm seeing now. So what am I
    seeing? Basically, I suspect my disk is killing me and my ability to
    work on the system. Simple things like changing workspaces/desktops
    stalls when this happens. Changing tabs in browsers also slows down, as
    down switching between application. Typically when this happens my hard
    drive light is steadily on. I run 'top' 24x7 in a shell so I can catch
    pestilences as quickly as possible and my processor is not usually be
    worked hard at this time (Core i7 something or another, 8 GB RAM, not
    usually pushing these resources overly hard). In the same display,
    though, the %wa (waiting on I/O I believe) is high at these times.
    Normally this is sitting at 0.0, maybe jumping up into the log
    percentages from time to time. It bounces around as I do I/O-intensive
    stuff, of course, but it seems to be happening a lot more now when I do
    not expect it.

    This morning @ 0800 I was working along and suddenly everything went
    into super-sluggish mode. The hard drive light was on (for ten to
    fifteen MINUTES), and snapper was running, which surprised me a little.
    I had, about five minutes earlier, installed a new package (updated
    wireshark from an OBS repository). The process list showed this had
    started from cron, which was interesting. The snapper process had
    started @ 0800 on its own which was pretty terrible timing for me since
    it's in the middle of my workday. Poking around in cron I found the
    following files:

    /etc/cron.daily/suse.de-snapper
    /etc/cron.hourly/suse.de-snapper

    Investigating further it appears that snapper is trying to do some
    optimization regularly. The daily cron job tries to do three types of
    jobs (depending on the snapper configuration per btrfs volume, which I
    have not tuned/touched at all so far) including 'NUMBER_CLEANUP',
    'TIMELINE_CLEANUP', and 'EMPTY_PRE_POST_CLEANUP'. The hourly job only
    tries to do the 'TIMELINE_CLEANUP'. After seeing this I decided to see
    what kind of snapshots I had since I have not created any manually:

    sudo snapper list

    It turns out I have quite a few. It's exciting to know that Yast in
    particular is taking snapshots of stuff as I use it which could be great
    for rolling back stuff when I really screw up. On the other hand, I
    suspect that the cleanup being done to remove empty snapshots is causing
    my system to behave badly. One of the processes I regularly see when my
    box is sluggish is named compare-dirs. I have not known for sure if it
    was for some kind of desktop search indexing or if it was related to
    btrfs, but looking now it resides in /usr/lib/snapper/bin/compare-dirs
    which makes that clear. I suspect that part of the cleanup being done
    involves compare-dirs going through and looking for things that may or
    may not have changed and then doing some action based on that, but with
    my laptop's lame hard drive this is impacting my regular work. Running
    the 3.x kernel I kind of hoped doing simultaneous tasks would behave a
    little better, but that brings me to my point (finally!).

    Do I need/want snapper working as often as it does? Sure, more
    snapshots could mean more-granular restores when I break things, but I
    am usually interested in performance more than the possible for granular
    restores (I backup aggressively on my own). Does anybody know which of
    these snapper operations is safest to disable and for which volumes?
    Anybody with experience tuning these jobs? Any practices I can adopt to
    minimize the impact of snapshots in general?

    As a last note, when I setup my machine I did not partition /home
    separately from the rest of the box (I think I made an error in that...
    usually I've wanted all of my disk space to be available to me in both
    /home as well as the rest of the filesystem so I just kept them
    together; it appears btrfs can maybe handle this differently which
    requires a bit of rethinking on my part). I suspect that this means my
    snapshots are bigger than they need to be due to all of the changes in
    my home directory (the only thing I care about in a disaster recovery
    situation and which I already backup).

    Any input is appreciated.

    AB

    P.S. Just noticed the "System stalling" thread from a couple minutes
    ago.... possibly related.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.18 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJPddR7AAoJEF+XTK08PnB5At0QAJZB7MrHaTEgaEYmq6S3wQmP
    uq9GyLfjNIAZKUfwTg4v7ysJyg0Ykt2bi16GapKhgQ5QDabQ52kJEAH3QjcHW1Ac
    nvHujzsbozE/oMyQlLwIOnw5V4QVF+T3FZZCFv1v2OflSczJ/29IZz8HTZlVKhZu
    ZBv8iFLtEwKnqDw5wc5AT8MwbvJmptv6YL6ygnFFW9AGt7M3HWe4OqFpyK2cGgD7
    nC199um5eq/GizHQHuxE5pONJbS9F0Fz7J38HRoQyVbft4TG70O2y3x5d4zfsa1z
    2g1Ak8rgrBfWc4ZdYaOvQtPCzCb6vXTOXgzk1Oz5TmPe6EVnAIsDtGm3u5G4s+8j
    ykglKbQBIUnRLt7Ov/puSMCgk4n2ROLy0U2cX8/CpQnfXXHgAHdoH63upCPho3ra
    VVYgTYdzySaJuFdrFIY/rlNYbAyciZtc2cJ31xMALhMfalxbMY8BA7OMQDMsvvqG
    CN+qa9m7hD4MtZkU9UkJ1dmIMLhLCZV/oQZgGStQUFBSJ8eUgXQ9IU3wPfD1TEmk
    p320jhjkjeBrTdOf5Rdbf5re/+7RG6O32u75DJe3b13+vGSkr7dEDO9SdvnfFVNi
    bG0YDpAVpjj8A1cyDz0PwRVXXsqcUfp7s6Mxqlvv8jxjRSUeD7Pum4EExt5QHzn+
    4ly4umhNjwGjZlGltGwT
    =Zi6X
    -----END PGP SIGNATURE-----
    Hi
    Checked the advanced power management on the drive, make sure the load
    count isn't increasing?
    Code:
    hdparm -B /dev/sda
    
    and
    
    smartctl -a /dev/sda |grep Load_Cycle_Count
    I had set manually in openSUSE on this DELL Latitude E5510.

    http://old-en.opensuse.org/Disk_Power_Management

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.27-default
    up 22:06, 3 users, load average: 0.03, 0.04, 0.05
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


  3. #3

    Default Re: opensuse 12.1, btrfs and snapper cron jobs

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    My hdparm value is 128, which I take to mean it is in the performance
    section but just barely. I've tested setting (as the site shows) to 252
    and it seems to accept that value. With that in mind, the
    Load_Cycle_Count is increasing every now and then so that I'm up at
    265,439 currently. When I checked twenty-eight minutes ago it was at
    265,431, so it increased once number every three to four minutes or so.
    The last time it went up (just now, to 265,440) was after my hdparm
    value being set to 252 (from 128) so should I set it to 254 or 255? The
    page mentions some concern over heat in that case, with a workaround of
    eventually spinning down after a period of time.

    Thank-you for your reply.
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.18 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJPdiKfAAoJEF+XTK08PnB5VYMQALAMIWcS4BgRdlPw8M6SVYkZ
    Z1IplY4SFalOLgx3KG2IcWKX4POvkk+mQU9lNcvmOMLICxH0aiayk4bnzpG9uLe6
    PU65tmpHco5RuT+ta+MYpUUsqDAjzCD8AHuqLeadA3ytvEiSl+tHnvmoPjHUPrzU
    NvY+V21WhI1Sa6q2aDpSXEBMkE9q//57bGYnjOnvQKWWDFIzrld5Y2lT2/5cVLEQ
    5QLDem0blOkkB2nd5wSIk8RZKVTBazn7zVjPNEB8RyDXDNi05gdPrmB0FpaV77OW
    AoVA5yoJmpyoNFXDAU+vJpLIubklNRgrsucU4UHDZfq7C82GVC/JBdNtCcfmjDE3
    fHfvd5Ym8YWcFnwKGCMjE27VvMLU8eVl1i/Wxw3plkEAZ+l8pxrEZXCpGqJxKBgn
    I1Pkv7cNXq/qzteWWCwnVIsD7dUbJsCWKQl6FD0KxOyd2e1MDj2rfF3YapNdbtoc
    wm9DFkb63AzzYaAHVxMRkHJHiVrgQ+t6gTjva8N46oxG1vyzjSxQ8FBxC04CiuDJ
    81SFuJGJUOBr15K1Zppb9NsSCeuif/Tf/ajqae4jzKfIx25tR076M4btu6b+bEjP
    3CyIZolPbsIyukgeTSgaNCLbqeGrCRlkivvjCPxLkDyWvFopMCe5pRBSMyiS//K+
    7v2XwVWtqoj3tVGKwLP4
    =TWZB
    -----END PGP SIGNATURE-----

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,644
    Blog Entries
    15

    Default Re: opensuse 12.1, btrfs and snapper cron jobs

    Quote Originally Posted by ab
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    My hdparm value is 128, which I take to mean it is in the performance
    section but just barely. I've tested setting (as the site shows) to 252
    and it seems to accept that value. With that in mind, the
    Load_Cycle_Count is increasing every now and then so that I'm up at
    265,439 currently. When I checked twenty-eight minutes ago it was at
    265,431, so it increased once number every three to four minutes or so.
    The last time it went up (just now, to 265,440) was after my hdparm
    value being set to 252 (from 128) so should I set it to 254 or 255? The
    page mentions some concern over heat in that case, with a workaround of
    eventually spinning down after a period of time.

    Thank-you for your reply.
    Hi
    SLED11 SP2 runs at 254, which is what I set openSUSE to run at as well
    since it defaults to 128 and doesn't activate the advanced pm at
    all.....

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.27-default
    up 1 day 2:42, 3 users, load average: 0.04, 0.03, 0.05
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •