httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45464] WebDav filesystem module is extremely slow
Date Thu, 24 Jul 2008 18:26:43 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45464


Jeff Trawick <trawick@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




--- Comment #2 from Jeff Trawick <trawick@apache.org>  2008-07-24 11:26:42 PST ---
For now, scratch my previous request to try with cadaver and try this patch
instead:

Index: modules/dav/fs/repos.c
===================================================================
--- modules/dav/fs/repos.c      (revision 679477)
+++ modules/dav/fs/repos.c      (working copy)
@@ -1480,9 +1480,8 @@
         dav_buffer_place_mem(pool, &fsctx->path1, dirent.name, len + 1, 0);


-        /* ### Optimize me, dirent can give us what we need! */
         status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf,
-                          APR_FINFO_NORM | APR_FINFO_LINK, pool);
+                          APR_FINFO_TYPE | APR_FINFO_LINK, pool);
         if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
             /* woah! where'd it go? */
             /* ### should have a better error here */

testing further with 2.0.61, I found a call to apr_*stat which would trigger
the extra Windows system overhead in 2.0.61+:

wanted=7582064 in the apr_stat call means retrieve lots of information about
the file, even though this code only needs to know the type (dir, regular file,
etc.)

for each member of collection!

(dbx) where
current thread: t@1
=>[1] apr_stat(finfo = 0x8047594, fname = 0x82251a0
"/export/home/trawick/davfs/col1/testfile.3148", wanted = 7582065, pool =
0x81eb0b8), line 234 in "filestat.c"
  [2] apr_lstat(finfo = 0x8047594, fname = 0x82251a0
"/export/home/trawick/davfs/col1/testfile.3148", wanted = 7582064, pool =
0x81eb0b8), line 287 in "filestat.c"
  [3] dav_fs_walker(fsctx = 0x8047550, depth = 1), line 1458 in "repos.c"
  [4] dav_fs_internal_walk(params = 0x80476f0, depth = 1, is_move = 0, root_dst
= (nil), response = 0x80476ec), line 1729 in "repos.c"
  [5] dav_fs_walk(params = 0x80476f0, depth = 1, response = 0x80476ec), line
1738 in "repos.c"
  [6] dav_method_propfind(r = 0x81eb0f0), line 2045 in "mod_dav.c"
  [7] dav_handler(r = 0x81eb0f0), line 4626 in "mod_dav.c"
  [8] ap_run_handler(0x81eb0f0, 0x0), at 0x8077866 
  [9] ap_invoke_handler(r = 0x81eb0f0), line 364 in "config.c"
  [10] ap_process_request(r = 0x81eb0f0), line 249 in "http_request.c"
  [11] ap_process_http_connection(c = 0x817b358), line 253 in "http_core.c"
  [12] ap_run_process_connection(0x817b358, 0x0), at 0x8084ff6 
  [13] ap_process_connection(c = 0x817b358, csd = 0x817b280), line 176 in
"connection.c"
  [14] child_main(child_num_arg = 5), line 610 in "prefork.c"
  [15] make_child(s = 0x80d0168, slot = 5), line 704 in "prefork.c"
  [16] ap_mpm_run(_pconf = 0x80ce388, plog = 0x80fa438, s = 0x80d0168), line
1001 in "prefork.c"
  [17] main(argc = 3, argv = 0x8047978), line 623 in "main.c"

I tested essentially the same patch onto 2.0.61 on Open Solaris, but the extra
overhead wasn't required on Unix anyway and performance didn't change
noticeably.

There are likely some other apr_*stat() calls in dav/fs/repos.c that can be
optimized.  For now please see how much this helps on Windows.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message