Re: DISCARD/WRITE_SAME request accounting (Was: Re: [PATCH 2/7] block: Implement support for WRITE SAME)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 7 Mar 2012, Vivek Goyal wrote:

> On Tue, Mar 06, 2012 at 12:54:52PM -0500, Martin K. Petersen wrote:
> > >>>>> "Vivek" == Vivek Goyal <vgoyal@xxxxxxxxxx> writes:
> > 
> > Vivek> Thinking loud. Will it logically make sense to account for whole
> > Vivek> BIO (all the sectors and not just 1). Target device did the
> > Vivek> actual work of writing the sector. Just that we reduced the data
> > Vivek> transfer overhead.
> > 
> > We have absolutely no idea how much work the storage device will do. It
> > could be doing zero-detect or dedup causing it to update an internal
> > allocation map instead of actually writing out blocks. Or it could be
> > forced to do more I/O than we requested due to wear leveling or because
> > it is a RAID device which has to write out full stripes and parity
> > blocks.
> > 
> > 
> > Vivek> I thought it will make more sense to count WRITE_SAME towards
> > Vivek> number of sectors written and not DISCARDS. Not sure why it make
> > Vivek> sense to count discard sectors towards sectors written in
> > Vivek> disk/part stat.
> > 
> > But we're measuring page out activity, right?
> > 
> > In my mind the only thing we can reliably measure is the I/O we're
> > transmitting to or receiving from the device. So I'd personally like to
> > see zero for discard and logical block size for write same.
> 
> counting IO which is being transmitted/received from device makes
> sense (Given the fact we don't know how much actual work device will
> have to do). So counting 1 block for write same and zero block for discard
> sounds reasonable to me.
> 
> Looks like current code counts all the discard sectors towards number of
> blocks written. So that will need to be changed. CCing Lukas, he might have
> thoughts/opinion on discard request accounting.

I am little surprised that we still count all the discard sectors
towards the number of bock written. I have mentioned this problem to
Jens last year.

Anyway, it would be nice to have separate counter for discard requests
and actually counting the discard sectors rather than just one for each
discard bio. I know that the device can ignore the whole, or part of the
request for its own reasons. But it is not a reason for not counting
what we actually intended to discard. I think this statistic will be
useful.

Consider for example the situation where you find you that you're
constantly discarding more than you actually write to the device over
some period of time. The you would probably want to adjust your discard
policy.

Thanks!
-Lukas

> 
> Thanks
> Vivek
> 

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux