linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Pelletier <plr.vincent@gmail.com>
To: Roy Sigurd Karlsbakk <roy@karlsbakk.net>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Spinning down idle disks?
Date: Mon, 27 May 2013 08:46:17 +0200	[thread overview]
Message-ID: <201305270846.18198.plr.vincent@gmail.com> (raw)
In-Reply-To: <20231564.0.1369565394879.JavaMail.root@zimbra>

Le dimanche 26 mai 2013 12:49:54, Roy Sigurd Karlsbakk a écrit :
> Is it possible somehow to have linux spin down idle disks in an MD raid as
> to use MD for a MAID (massive array of idle disks)? I tried to monitor an
> idle raid with blktrace, and it seems the array (and its members) is
> accessed every two seconds for some reason. The array used with for the
> testing is a idle, degraded raid-5.

FWIW, there is a small daemon to spin disks down in a - to me - clever way: 
only reads from device reset spindown timeout. Writes are kept in cache until 
an explicit flush happens.

http://noflushd.sourceforge.net/

This allows skipping superblock refreshes (FS- and MD-level).
It has a large drawback when using it for MD (and other composite devices): it 
doesn't look for slave devices, so if you tell it to control sda and sdb and 
you have md0 on top of both, it will eventually spin down sda and sdb, only to 
manually flush md0, spinning both up again.

I've implemented a quick-hack workaround for this:

https://github.com/vpelletier/pynoflushd

Both implementation have the drawback of increasing the frequency of writes to 
the actual disk: as the daemon take over dirty_writeback_centisecs's job using 
userspace-available flush methods (mine using BLKFLSBUF ioctl, the original 
using fsync on block device), something gets flushed which is usually not (I 
wandered a bit in kernel code without finding how writeback code handles this 
timeout).

I think it would be nice to have an equivalent of dirty_writeback_centisecs at 
device granularity, so that one doesn't have to delegate flushing to a 
userspace daemon.

Regards,
-- 
Vincent Pelletier
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2013-05-27  6:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-26 10:49 Spinning down idle disks? Roy Sigurd Karlsbakk
2013-05-27  6:46 ` Vincent Pelletier [this message]

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=201305270846.18198.plr.vincent@gmail.com \
    --to=plr.vincent@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=roy@karlsbakk.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).