Re: Overhead per write

27 views
Skip to first unread message

Sergio Bossa

unread,
Jan 17, 2013, 4:03:11 AM1/17/13
to jour...@googlegroups.com
Hi Julien,

thanks for the kind words.

The overhead is 21 bytes per batch plus 9 bytes per item stored into
the batch: so, if a batch has 2 items, the total overhead will be 21 +
9 + 9.
If you make lots of small writes, it certainly makes sense to batch
them as much as possible, even if this will have durability
implications, and if your writes are just a couple of bytes long, the
overhead would be sensible in any case.
There is no easy solution there: maybe you could think about how to
store them together by the application side, and then write into the
journal.

Hope that helps, feel free to get back with more questions.
Cheers,

Sergio B.

On Thu, Jan 17, 2013 at 4:11 AM, Julien Eluard <julien...@gmail.com> wrote:
> Hi,
>
> any idea what is the overhead in size on disk per write?
> Does that make sense to write lots of small byte arrays (couple bytes)?
>
> PS: just started using Journal.IO and I am very impressed so far!
>
> Thanks,
> Julien



--
Sergio Bossa
http://www.linkedin.com/in/sergiob

Julien Eluard

unread,
Jan 17, 2013, 10:05:50 PM1/17/13
to jour...@googlegroups.com
Thanks for the answer!

That's what I observed so makes sense. I guess a SYNC write is equivalent to a batch of 1 item.

About SYNC write am I correctly assuming that the WriteCallback will be called synchronously during the write call?

Julien

Sergio Bossa

unread,
Jan 18, 2013, 5:16:04 PM1/18/13
to jour...@googlegroups.com
On Fri, Jan 18, 2013 at 3:05 AM, Julien Eluard <julien...@gmail.com> wrote:

> I guess a SYNC write is equivalent to
> a batch of 1 item.

Correct.

> About SYNC write am I correctly assuming that the WriteCallback will be
> called synchronously during the write call?

Correct again :)

Julien Eluard

unread,
Jan 19, 2013, 8:09:46 PM1/19/13
to jour...@googlegroups.com
Great thanks!

Julien
Reply all
Reply to author
Forward
0 new messages