From: Sabar Siddhartha Dasgupta <sabard@stanford.edu>
To: Brian Silverman <brian@peloton-tech.com>
Cc: rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: RT File Logging
Date: Fri, 7 Oct 2016 00:08:20 -0700 [thread overview]
Message-ID: <CAHDbYRiCRqaHgN9oYLemS3Jjg9ZPR4HrS7RXPQGvbeM+Rv7r4A@mail.gmail.com> (raw)
In-Reply-To: <CAGt3f4kxtzLbby_XBAVPP+RVcqNCNkBy0ybHxzOi0M5rguNwSQ@mail.gmail.com>
Thank you for the help!
It ended up being a problem with sqlite3's journaling system waiting
for the writer to unlock the OS buffers before creating a rollback
file. Changing the journal configuration to stay in memory rather than
disk made the journaling way faster and fixed the problem.
I will keep the potential priority problems in mind for the future!
Thanks again,
Sabar
On Mon, Oct 3, 2016 at 11:44 AM, Brian Silverman <brian@peloton-tech.com> wrote:
> Have you looked for any internal locks sqlite3 is using? Keeping in
> mind I have no experience with that library whatsoever, it sounds like
> you may be running into sqlite3async_run holding a lock while it does
> IO, which causes sqlite3_step to block waiting for it to finish. Even
> if the disk IO thread doesn't do much with the lock held, you could be
> running into priority inversion
> (https://en.wikipedia.org/wiki/Priority_inversion has a description
> and some solutions).
>
> You might have less problems if you split anything realtime (like
> reading your data from shared memory) and all the sqlite3 things out
> into separate processes. Pipes and POSIX shared memory queues should
> work.
>
> If you're still having problems, it might be worth asking sqlite3
> people. Specifically, how they do locking etc sounds relevant.
>
> Best of luck,
> Brian
prev parent reply other threads:[~2016-10-07 7:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-01 0:20 RT File Logging Sabar Siddhartha Dasgupta
2016-10-03 18:02 ` Austin Schuh
2016-10-03 18:44 ` Brian Silverman
2016-10-07 7:08 ` Sabar Siddhartha Dasgupta [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=CAHDbYRiCRqaHgN9oYLemS3Jjg9ZPR4HrS7RXPQGvbeM+Rv7r4A@mail.gmail.com \
--to=sabard@stanford.edu \
--cc=brian@peloton-tech.com \
--cc=linux-rt-users@vger.kernel.org \
/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).