Actions
Bug #15225
closedLinking to -lrbd causes process startup times to balloon
Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Community (user)
Tags:
Backport:
hammer,infernalis
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Take a trivial program:
$ cat test.c
#include <stdlib.h>
int main () { exit (0); }
and compare the startup time with and without linking to -lrados -lrbd.
Without:
$ gcc test.c -o test
$ TIMEFORMAT='%R' ; time ./test
0.001
With:
$ gcc test.c -o test -lrbd
$ TIMEFORMAT='%R' ; time ./test
0.044
This really matters - currently initializing librbd consumes
15% of the total time taken to start up the libguestfs appliance.
I looked at the code and did some profiling with perf [see attachment]
and it seems as if the following code is responsible:
https://github.com/ceph/ceph/blob/master/src/common/Cycles.cc#L50
This code is really wrong, but it in lieu of being able to fix it,
it would be nice at least to have an environment variable we can
use to skip the madness.
Files
Actions