Bug #1517

one second delay after stat() / Linux epoll / lighttpd-r2025

Added by Safari 360 days ago. Updated 89 days ago.

Status:Fixed Start:
Priority:Normal Due date:
Assigned to:jan % Done:

100%

Category:core
Target version:1.5.0
Pending:

No

Resolution:

Patch available:

Yes


Description

Most of the time, there is one second delay between stat() is called and
some action is visible to client (e.g. 404 error written).

Attached strace files:
slow-with-stat_cache.txt:
server.stat-cache-engine = "simple"
server.max-stat-threads = 32

slow-no-stat_cache.txt:
no stat-cache.

Both have:
server.event-handler = "linux-sysepoll"

lighttpd-svn-fix-1s-delay.patch (2.5 KB) Safari, 03/02/2008 01:48 AM

slow-no-stat_cache.txt (4.8 KB) Safari, 01/13/2008 01:09 AM

slow-with-stat_cache.txt (20.3 KB) Safari, 01/13/2008 01:08 AM


Related issues

blocks Feature #1795 add gthread-freebsd-sendfile (patch) New 10/10/2008

Associated revisions

Revision 2342
Added by stbuehler 89 days ago

Use pipe-io instead of SIGUSR1 to wakeup main thread (fixes #1517)

History

03/01/2008 11:19 PM - Safari

If I make N (N > 1) requests in parallel, the (N - 1) first work OK, but the last one is delayed by one second. Some queue management bug? Debug prints for queues are non-existent, queue loop is pretty complex... someone want to help me with this?

03/02/2008 01:48 AM - Safari

Found the bug. SIGUSR1 hack is not working as hoped: epoll_wait is not always interrupted with EINTR. I nuked SIGUSR1 and replaced with reading/writing a pipe.
There may be other ways to solve this problem, too.

You are welcome.

03/16/2008 01:10 PM - Safari

This patch also fixes the performance problem with gthread-aio.
I get now 180 MB/s instead of < 1 MB/s.
See #1186

05/11/2008 03:33 PM - Anonymous

new patch for rev 2169? gthread-aio is really slow

10/10/2008 04:40 AM - peto

This issue still exists in r2294, and also makes AIO unusable in FBSD. This patch works (with a couple obvious lines added to base.h that were missing). Please apply this before the final 1.5 release; AIO is the biggest 1.5 feature and this is a critical fix.

10/10/2008 05:23 AM - stbuehler

  • Patch available set to Yes

10/10/2008 11:30 PM - stbuehler

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2342.

Also available in: Atom PDF