Fossil Forum

Noticeable Slowdown on OpenBSD (httpd/slowcgi setup) since [4aa78375055222d1]
Login

Noticeable Slowdown on OpenBSD (httpd/slowcgi setup) since [4aa78375055222d1]

Noticeable Slowdown on OpenBSD (httpd/slowcgi setup) since [4aa78375055222d1]

(1) By Martin Gagnon (mgagnon) on 2022-11-29 19:31:18 [source]

I just noticed a significant slowdown with recent fossil build running on OpenBSD (using httpd/slowcgi setup).

When browsing any repo (small or big) from our corporate internal network, each page rendering have a minimum of 2 seconds and can take up to 4 seconds. This for any page (/vinfo, /info, /timeline, ...)

  • Didn't notice visible difference on CLI (fossil commands direct on server via ssh)
    (But: web-page rendering via httpd/slowcgi is very slow.)
  • bisect point me to this checkin
    • each page take a few second delay before to appear with this version.
    • with previous version, pages appear instantly

The problematic checkin is a SQLite Update (--> 3.40.0 alpha).

Someone else notice this kind of slowdown since this update ?

(2) By Richard Hipp (drh) on 2022-11-29 20:11:36 in reply to 1 [link] [source]

No. The self-hosting Fossil repos, and SQLite, and a bunch of others have been using that check-in and later without issue.

Do you have a repo that I can clone, and a specific URL that demonstrates the problem?

(3) By Martin Gagnon (mgagnon) on 2022-11-29 22:05:14 in reply to 2 [link] [source]

Ok, I did some experimentation and I can reproduce the issue on linux using fossil ui locally on a brand new repo. (nothing to do with my OpenBSD httpd/slowcgi setup.)

It happens to be slow when fetching some ".js" or ".png" files from the skins header. Those files are embedded on the repo and are accessed via en embedded doc link as follow:

doc/trunk/some/dir/file.js

The skins header fetch 1 ".css" and 2 ".js" files that are: 655B, 7.44KB and 993B respectively. It take up to 4 seconds to fetch those 3 files.

I'll send you a copy of my test repo if you want.

(4) By Richard Hipp (drh) on 2022-11-29 23:42:22 in reply to 3 [link] [source]

I'll send you a copy of my test repo if you want.

Yes, please do send the test repo, and a specific URL that demonstrates the problem. I need to be able to reproduce the problem in order to fix it. Send to drh at sqlite dot org.

(5) By Martin Gagnon (mgagnon) on 2022-11-29 23:52:28 in reply to 4 [link] [source]

Already uploaded on “/chat”.

For the url, it happens with any since slow content is fetched from the header of the skin.

(6) By george on 2022-11-30 00:26:33 in reply to 1 [link] [source]

I suggest that assets (supplementary CSS, JavaScript and so on) are fetched via /raw page (and not via /doc page).

See my older post for the trick.

(7) By Richard Hipp (drh) on 2022-11-30 01:06:22 in reply to 1 [link] [source]

Please try the latest trunk check-in.

SQLite recently changed from using "config.h" to "sqlite_cfg.h" for autoconf-discovered configuration options, to work around some weird dependency in some other project. I think that was the source of this issue. SQLite was not being compiled with HAVE_USLEEP, so if there is any contention, the query is delayed by one second, rather than a millisecond.

So the problem was a Makefile change, not a problem in SQLite, it seems.

(8) By Richard Hipp (drh) on 2022-11-30 12:19:23 in reply to 7 [link] [source]

A new snapshot build of latest trunk that includes the fix above is now available on the Download page.

(9) By Richard Hipp (drh) on 2022-11-30 13:57:57 in reply to 7 [link] [source]