bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] add option --no-cache-file and configuration variable no_cac


From: Hideki IWAMOTO
Subject: Re: [PATCH] add option --no-cache-file and configuration variable no_cache_file
Date: Mon, 07 Jul 2003 00:12:56 +0900

On Mon, 26 May 2003 11:43:11 +0900, Shigio Yamaguchi wrote...
> > Subject: [PATCH] add option --no-cache-file and configuration variable
> >  no_cache_file
> > If there are enough memory, it is not necessary to make tag cache files.
> 
> If enough memory exists, it is faster to execute all on memory.
> I agree with you for this respect.
> 

As a result of comparing execution time, it turns out that it is applied only
when perl is configured so that vfork might be used.
It is faster to use cache file, when using fork.

Though regrettable, in perl-5.8, vfork is not used any longer. 
usevfork is disregarded and fork is always used.
Is there any workaround except using old perl?

--------------+--------------------------------------
              |              tag cache
  perl        |       file               memory
--------------+--------------------------------------
  5.6.1       | 1332u 494s 35:50   1135u 1203s 40:03
  5.6.1 vfork | 1404u 233s 30:59   1222u  206s 26:14
  5.8.0       | 1772u 495s 40:32   1603u 1140s 46:32
--------------+--------------------------------------
Conditions:  
  .globalrc
     format=compact
     htags_options=-acDfFnos
  environment
     GTAGSCACHE=50000000
  Target source code
     linux-2.4.21


perl-5.6.1, cache file
------------------------------------------------------
address@hidden:/home/iwamoto/work/linux-2.4.21>time htags --statistics
- Elapsed time of making duplicate entries ............        283 seconds.
- Elapsed time of making function index ...............         20 seconds.
- Elapsed time of making file index ...................         73 seconds.
- Elapsed time of making hypertext ....................       1762 seconds.
- The entire elapsed time .............................       2151 seconds.
1332.430u 494.390s 35:50.95 84.9%       0+0k 0+0io 28354486pf+0w

address@hidden:/home/iwamoto/work/linux-2.4.21>strace -c htags --statistics
execve("/home/iwamoto/global/bin/htags", ["htags", "--statistics"], [/* 32 vars 
*/]) = 0
- Elapsed time of making duplicate entries ............        216 seconds.
- Elapsed time of making function index ...............         23 seconds.
- Elapsed time of making file index ...................         35 seconds.
- Elapsed time of making hypertext ....................       1838 seconds.
- The entire elapsed time .............................       2121 seconds.
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 40.67  115.863350        2145     54003           clone
 35.12  100.057296         279    358557           read
 14.44   41.140623          15   2784349           pread
  3.83   10.913670          21    525639           pwrite
  1.70    4.849756          21    230585           close
  1.54    4.379560          19    232210           write
  1.22    3.467718          63     55462           munmap
  0.47    1.334962          25     54003           wait4
  0.38    1.079261          10    108006           pipe
  0.20    0.557749           2    324023           rt_sigaction
  0.12    0.348765          34     10296        57 stat64
  0.10    0.272129           3    107969           fcntl64
  0.07    0.193143           3     56913           fstat64
  0.07    0.186068           3     55468           mmap2
  0.04    0.102294           2     54211     54003 _llseek
  0.01    0.028357           2     13102           dup2
  0.01    0.027357          18      1495        24 open
  0.01    0.021448        1341        16        13 unlink
  0.01    0.016725           5      3681           brk
  0.01    0.014588        2431         6           fsync
  0.00    0.009519           4      2526           mremap
  0.00    0.000339          48         7           mkdir
  0.00    0.000130           4        29           old_mmap
  0.00    0.000084           2        52           rt_sigprocmask
  0.00    0.000054          14         4           link
  0.00    0.000047           9         5           chmod
  0.00    0.000023           2        14           time
  0.00    0.000013           7         2           chdir
  0.00    0.000005           2         3           getgroups32
  0.00    0.000004           4         1           uname
  0.00    0.000003           2         2           getpid
  0.00    0.000003           3         1           set_thread_area
  0.00    0.000002           2         1           geteuid32
  0.00    0.000002           2         1           set_tid_address
  0.00    0.000001           1         1           getrlimit
  0.00    0.000001           1         1           getuid32
  0.00    0.000001           1         1           getgid32
  0.00    0.000001           1         1           getegid32
------ ----------- ----------- --------- --------- ----------------
100.00  284.865051               5032646     54097 total

perl-5.6.1, memory cache
------------------------------------------------------
address@hidden:/home/iwamoto/work/linux-2.4.21>time htags --statistics
- Elapsed time of making duplicate entries ............        104 seconds.
- Elapsed time of making function index ...............          8 seconds.
- Elapsed time of making file index ...................         81 seconds.
- Elapsed time of making hypertext ....................       2210 seconds.
- The entire elapsed time .............................       2403 seconds.
1135.190u 1203.750s 40:03.06 97.3%      0+0k 0+0io 28715200pf+0w

address@hidden:/home/iwamoto/work/linux-2.4.21>strace -c htags --statistics
execve("/home/iwamoto/global/bin/htags", ["htags", "--statistics"], [/* 32 vars 
*/]) = 0
- Elapsed time of making duplicate entries ............         96 seconds.
- Elapsed time of making function index ...............          8 seconds.
- Elapsed time of making file index ...................         81 seconds.
- Elapsed time of making hypertext ....................       2307 seconds.
- The entire elapsed time .............................       2501 seconds.
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 75.08  489.464445        9064     54003           clone
 21.98  143.260619         400    358326           read
  0.75    4.863868          21    232210           write
  0.65    4.260534          18    230561           close
  0.51    3.345478          60     55449           munmap
  0.38    2.505259          46     54003           wait4
  0.16    1.047058          10    108006           pipe
  0.15    1.003537           9    107963           fcntl64
  0.12    0.778255          14     56889           fstat64
  0.09    0.565831           2    324022           rt_sigaction
  0.05    0.352155          34     10252        23 stat64
  0.03    0.186513           3     55468           mmap2
  0.02    0.106448           2     54003     54003 _llseek
  0.02    0.099768           4     26033           brk
  0.00    0.027878           2     13102           dup2
  0.00    0.025685          18      1448         1 open
  0.00    0.009239           4      2421           mremap
  0.00    0.000339          48         7           mkdir
  0.00    0.000066           3        19           old_mmap
  0.00    0.000050          13         4           link
  0.00    0.000044           9         5           chmod
  0.00    0.000024           6         4         4 unlink
  0.00    0.000020           2        11           time
  0.00    0.000012           6         2           chdir
  0.00    0.000005           2         3           rt_sigprocmask
  0.00    0.000005           2         3           getgroups32
  0.00    0.000004           4         1           uname
  0.00    0.000003           3         1           set_thread_area
  0.00    0.000002           2         1           getpid
  0.00    0.000001           1         1           getuid32
  0.00    0.000001           1         1           getgid32
  0.00    0.000001           1         1           geteuid32
  0.00    0.000001           1         1           getegid32
------ ----------- ----------- --------- --------- ----------------
100.00  651.903148               1744224     54031 total

perl-5.6.1 configured with -Dusevfork, cache file
------------------------------------------------------
address@hidden:/home/iwamoto/work/linux-2.4.21>time htags --statistics
- Elapsed time of making duplicate entries ............        346 seconds.
- Elapsed time of making function index ...............         17 seconds.
- Elapsed time of making file index ...................         63 seconds.
- Elapsed time of making hypertext ....................       1420 seconds.
- The entire elapsed time .............................       1859 seconds.
1404.590u 233.880s 30:59.36 88.1%       0+0k 0+0io 30992092pf+0w

address@hidden:/home/iwamoto/work/linux-2.4.21>strace -c htags --statistics
execve("/home/iwamoto/global/bin/htags", ["htags", "--statistics"], [/* 32 vars 
*/]) = 0
- Elapsed time of making duplicate entries ............        293 seconds.
- Elapsed time of making function index ...............         23 seconds.
- Elapsed time of making file index ...................         26 seconds.
- Elapsed time of making hypertext ....................       1601 seconds.
- The entire elapsed time .............................       1953 seconds.
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 63.35  260.559716        4825     54003           vfork
 19.91   81.870234         228    358564           read
  9.53   39.206486          14   2784349           pread
  2.44   10.038321          19    525639           pwrite
  1.78    7.312749          32    230587           close
  1.12    4.604114          20    235003           write
  0.93    3.835889          69     55463           munmap
  0.30    1.234117          23     54003           wait4
  0.25    1.015581           9    108006           pipe
  0.13    0.542714           2    324023           rt_sigaction
  0.08    0.321896          31     10296        57 stat64
  0.05    0.205328           2    107970           fcntl64
  0.05    0.202836           4     55470           mmap2
  0.03    0.127015           2     56916           fstat64
  0.03    0.115794           2     54211     54003 _llseek
  0.01    0.030074           2     13102           dup2
  0.01    0.024283          16      1497        24 open
  0.01    0.020877        1305        16        13 unlink
  0.00    0.013707           4      3687           brk
  0.00    0.007573           4      2120           mremap
  0.00    0.006111        1019         6           fsync
  0.00    0.000311          44         7           mkdir
  0.00    0.000117           4        29           old_mmap
  0.00    0.000084           2        52           rt_sigprocmask
  0.00    0.000050          13         4           link
  0.00    0.000045           9         5           chmod
  0.00    0.000043           3        14           time
  0.00    0.000014          14         1           set_thread_area
  0.00    0.000011           6         2           chdir
  0.00    0.000005           2         3           getgroups32
  0.00    0.000004           2         2           getpid
  0.00    0.000003           3         1           uname
  0.00    0.000002           2         1           getuid32
  0.00    0.000002           2         1           geteuid32
  0.00    0.000002           2         1           set_tid_address
  0.00    0.000001           1         1           getrlimit
  0.00    0.000001           1         1           getgid32
  0.00    0.000001           1         1           getegid32
------ ----------- ----------- --------- --------- ----------------
100.00  411.296111               5035057     54097 total

perl-5.6.1 configured with -Dusevfork, memory cache
------------------------------------------------------
address@hidden:/home/iwamoto/work/linux-2.4.21>time htags --statistics
- Elapsed time of making duplicate entries ............        212 seconds.
- Elapsed time of making function index ...............          8 seconds.
- Elapsed time of making file index ...................         77 seconds.
- Elapsed time of making hypertext ....................       1276 seconds.
- The entire elapsed time .............................       1574 seconds.
1222.560u 206.770s 26:14.69 90.7%       0+0k 0+0io 30992071pf+0w

address@hidden:/home/iwamoto/work/linux-2.4.21>strace -c htags --statistics
execve("/home/iwamoto/global/bin/htags", ["htags", "--statistics"], [/* 32 vars 
*/]) = 0
- Elapsed time of making duplicate entries ............        220 seconds.
- Elapsed time of making function index ...............          7 seconds.
- Elapsed time of making file index ...................         27 seconds.
- Elapsed time of making hypertext ....................       1325 seconds.
- The entire elapsed time .............................       1580 seconds.
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 72.04  262.900245        4868     54003           vfork
 22.59   82.449608         230    358326           read
  2.00    7.288686          32    230562           close
  1.18    4.314676          19    232210           write
  1.09    3.975190          72     55449           munmap
  0.30    1.087627          20     54003           wait4
  0.27    1.000662           9    108006           pipe
  0.17    0.631923          24     26173           brk
  0.15    0.537633           2    324022           rt_sigaction
  0.05    0.187639           3     55471           mmap2
  0.05    0.186763           2    107963           fcntl64
  0.03    0.120161           2     56890           fstat64
  0.03    0.095478           2     54003     54003 _llseek
  0.02    0.085809           8     10252        23 stat64
  0.01    0.027259           2     13102           dup2
  0.01    0.025613          18      1449         1 open
  0.00    0.015730           6      2424           mremap
  0.00    0.000306          44         7           mkdir
  0.00    0.000062           3        19           old_mmap
  0.00    0.000049          12         4           link
  0.00    0.000044           9         5           chmod
  0.00    0.000024           6         4         4 unlink
  0.00    0.000019           2        11           time
  0.00    0.000009           5         2           chdir
  0.00    0.000005           2         3           getgroups32
  0.00    0.000004           4         1           uname
  0.00    0.000004           1         3           rt_sigprocmask
  0.00    0.000003           3         1           set_thread_area
  0.00    0.000002           2         1           getpid
  0.00    0.000001           1         1           getuid32
  0.00    0.000001           1         1           getgid32
  0.00    0.000001           1         1           geteuid32
  0.00    0.000001           1         1           getegid32
------ ----------- ----------- --------- --------- ----------------
100.00  364.931237               1744373     54031 total

perl-5.8.0 shipped with Redhat9, cache file
------------------------------------------------------
address@hidden:/home/iwamoto/work/linux-2.4.21>time htags --statistics
- Elapsed time of making duplicate entries ............        325 seconds.
- Elapsed time of making function index ...............         18 seconds.
- Elapsed time of making file index ...................         48 seconds.
- Elapsed time of making hypertext ....................       2036 seconds.
- The entire elapsed time .............................       2432 seconds.
1772.070u 495.610s 40:32.28 93.2%       0+0k 0+0io 31061355pf+0w

address@hidden:/home/iwamoto/work/linux-2.4.21>strace -c htags --statistics
execve("/home/iwamoto/global/bin/htags", ["htags", "--statistics"], [/* 32 vars 
*/]) = 0
- Elapsed time of making duplicate entries ............        523 seconds.
- Elapsed time of making function index ...............         30 seconds.
- Elapsed time of making file index ...................         73 seconds.
- Elapsed time of making hypertext ....................       2127 seconds.
- The entire elapsed time .............................       2768 seconds.
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 54.13  150.610476          39   3857967           read
 26.78   74.507895        1380     54003           clone
  7.35   20.439800          10   1952949           write
  7.24   20.148240           4   4651438           lseek
  1.63    4.538740          21    217476           close
  1.42    3.950332          12    324024           rt_sigaction
  0.48    1.337720          25     54003           wait4
  0.36    0.994502           9    108006           pipe
  0.22    0.612423          59     10309        77 stat64
  0.14    0.387668           4    109439    105700 _llseek
  0.10    0.267077           5     55455     55452 ioctl
  0.09    0.238764           4     53960           fcntl64
  0.02    0.067787          45      1515        51 open
  0.01    0.033390           3     13102           dup2
  0.01    0.030108        1882        16        13 unlink
  0.01    0.029410           8      3589           brk
  0.01    0.028888          11      2646           mremap
  0.00    0.009785        1631         6           fsync
  0.00    0.003733           3      1455           fstat64
  0.00    0.000893         128         7           mkdir
  0.00    0.000652          59        11           mmap2
  0.00    0.000100           3        29           old_mmap
  0.00    0.000054          27         2           munmap
  0.00    0.000051          13         4           link
  0.00    0.000051          10         5           chmod
  0.00    0.000043          43         1           readlink
  0.00    0.000022           2        11           time
  0.00    0.000014           7         2           chdir
  0.00    0.000004           4         1           uname
  0.00    0.000004           1         3           getgroups32
  0.00    0.000004           4         1           set_thread_area
  0.00    0.000003           2         2           rt_sigprocmask
  0.00    0.000003           3         1           futex
  0.00    0.000002           2         1           getpid
  0.00    0.000002           2         1           getppid
  0.00    0.000002           2         1           getrlimit
  0.00    0.000002           2         1           getuid32
  0.00    0.000002           2         1           getegid32
  0.00    0.000002           2         1           set_tid_address
  0.00    0.000001           1         1           getgid32
  0.00    0.000001           1         1           geteuid32
------ ----------- ----------- --------- --------- ----------------
100.00  278.238650              11471446    161293 total

perl-5.8.0 shipped with Redhat9, memory cache
------------------------------------------------------
address@hidden:/home/iwamoto/work/linux-2.4.21>time htags --statistics
- Elapsed time of making duplicate entries ............        221 seconds.
- Elapsed time of making function index ...............         11 seconds.
- Elapsed time of making file index ...................         72 seconds.
- Elapsed time of making hypertext ....................       2481 seconds.
- The entire elapsed time .............................       2792 seconds.
1603.400u 1140.840s 46:32.42 98.2%      0+0k 0+0io 31045633pf+0w

address@hidden:/home/iwamoto/work/linux-2.4.21>strace -c htags --statistics
execve("/home/iwamoto/global/bin/htags", ["htags", "--statistics"], [/* 32 vars 
*/]) = 0
- Elapsed time of making duplicate entries ............        205 seconds.
- Elapsed time of making function index ...............         11 seconds.
- Elapsed time of making file index ...................         96 seconds.
- Elapsed time of making hypertext ....................       2630 seconds.
- The entire elapsed time .............................       2943 seconds.
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 71.34  472.489683        8749     54003           clone
 25.78  170.714074         476    358328           read
  0.73    4.811766          21    232255           write
  0.62    4.083742          19    217462           close
  0.60    3.997911          12    324024           rt_sigaction
  0.35    2.332727          43     54003           wait4
  0.15    1.007399           9    108006           pipe
  0.14    0.936249          17     55446     55443 ioctl
  0.14    0.924226           8    109424    105700 _llseek
  0.10    0.649236          26     25119           brk
  0.02    0.163186           3     53960           fcntl64
  0.01    0.091147           9     10262        32 stat64
  0.01    0.055727          38      1465        15 open
  0.01    0.034922           3     13102           dup2
  0.00    0.009131           4      2265           mremap
  0.00    0.003886           3      1450           fstat64
  0.00    0.000822          27        30           mmap2
  0.00    0.000322          46         7           mkdir
  0.00    0.000241          34         7           munmap
  0.00    0.000098           4        25           old_mmap
  0.00    0.000054          14         4           link
  0.00    0.000047           9         5           chmod
  0.00    0.000038          38         1           readlink
  0.00    0.000030           8         4         4 unlink
  0.00    0.000025           2        11           time
  0.00    0.000014           7         2           chdir
  0.00    0.000005           2         3           getgroups32
  0.00    0.000004           4         1           set_thread_area
  0.00    0.000003           3         1           uname
  0.00    0.000002           2         1           getpid
  0.00    0.000002           1         2           rt_sigprocmask
  0.00    0.000002           2         1           getegid32
  0.00    0.000002           2         1           set_tid_address
  0.00    0.000001           1         1           getppid
  0.00    0.000001           1         1           getrlimit
  0.00    0.000001           1         1           getuid32
  0.00    0.000001           1         1           getgid32
  0.00    0.000001           1         1           geteuid32
------ ----------- ----------- --------- --------- ----------------
100.00  662.306728               1620685    161194 total





----
Hideki IWAMOTO  address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]