I assume that this is related to the SSD code handling multiple fragments...

The default target fragment size is 1MB.  This code says that if we have
between 1MB and 1.25MB then write only 1MB as we will be able to use
the fast non-fragmenting buffer freelist to hold the 1MB on read.   Lower
than
1MB it will not do the write until a close or more data arrives.  Greater
than
1.25 MB and we assume that we are falling behind on writing (when the system
is not overloaded this code will be called frequently as data arrives) and
we
sacrifice some potential inefficiency on read by writing as much as we can.

On Sat, May 28, 2011 at 7:55 AM, 张练 <wahu0315...@gmail.com> wrote:

> I'm considering the multi fragment issue. In iocore/cache/CacheWrite.cc,
> function CacheVC::openWriteMain, there are phrases :
>  if (length > target_fragment_size() &&
>      (length < target_fragment_size() + target_fragment_size() / 4))
>    write_len = target_fragment_size();
>  else
>    write_len = length;
>
> I want to know why it does like that?
> If one object's size is between [target_fragment_size() +
> target_fragment_size() / 4, MAX_FRAG_SIZE) , then does multi fragments
> happen?
>
> --
> Best regards,
> mohan_zl
>

Reply via email to