[systemd-devel] [PATCH] [RFCv3] Add sync timer to journal server
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Tue Mar 19 06:50:25 PDT 2013
On Tue, Mar 19, 2013 at 07:53:45AM +0200, Oleksii Shevchuk wrote:
> > > + if (! (f->writable && f->fd >= 0))
> > > + return -1;
> > -1 means EPERM. Something different is needed.
>
> EINVAL/EBUSY/EFAULT ?
At least if !f->writable then the return code should be 0.
> > > + fdatasync(f->fd);
> > Apparently the only error code which could happen here is EIO.
> > Are you sure that we want to ignore it?
>
> I think we don't care at that point
>
> > What is the effect of fdatasync every 10 msg during high load? Wouldn't
> > this decrease the throughput significantly?
>
> In case of high load and idle timer strategy should be the way to have
> guaranted maximum count of not saved messages. But I have doubt about
> it. I can set this as optional parameter with high defaults, and
> introduce additional timer with maximal commit timeout. What do you
> think about it?
I think that this is the same thing as with fixed times: if you set
the interval to 100000 msgs, you get a random sync every few days,
which is useless. If you set it low, than you limit the throughput.
I think that the msg-based limit doesn't make much sense.
Zbyszek
More information about the systemd-devel
mailing list