Red Hat Bugzilla – Bug 819115
Client library performance is bad (with default SELinux patch applied)
Last modified: 2013-02-13 14:26:55 EST
Created attachment 582215 [details]
TGT request loop code
Description of problem:
Client libraries from "krb5" SRPM have terrible performance in benchmarks, because of Fedora SELinux patch. It makes Fedora unusable for Kerberos performance testing.
Results from synthetic test - request 10000 TGT for single principal, from single thread:
- Fedora build with SELinux patch: 1 minute 27 seconds
- Manual build without SELinux patch: 3 seconds
Performance drop is approximately 30 times.
Version-Release number of selected component (if applicable):
Always with standard F16 krb5 build.
Steps to Reproduce:
1. download attached "gettgtloop.c" and modify principal name & keytab path to existing values
1. compile "gettgtloop.c" with "gcc -std=c99 -O2 -Wall gettgtloop.c -lkrb5 -lkrb5support"
2. time "gettgtloop" execution with /usr/bin/time
3. recompile client libraries from SRPM without "krb5-1.9-selinux-label.patch"
4. repeat whole test and compare timing results
Actual results (three executions, 10000 AS/TGT requests each):
==> 1 <==
71.19user 11.01system 1:27.13elapsed 94%CPU (0avgtext+0avgdata 11284maxresident)k
0inputs+0outputs (0major+3152503minor)pagefaults 0swaps
==> 2 <==
71.25user 11.26system 1:27.69elapsed 94%CPU (0avgtext+0avgdata 11288maxresident)k
0inputs+0outputs (0major+3151315minor)pagefaults 0swaps
==> 3 <==
70.98user 10.61system 1:26.54elapsed 94%CPU (0avgtext+0avgdata 11288maxresident)k
0inputs+0outputs (0major+2926782minor)pagefaults 0swaps
Expected results (after recompilation without krb5-1.9-selinux-label.patch):
==> 1 <==
0.98user 0.62system 0:03.24elapsed 49%CPU (0avgtext+0avgdata 8484maxresident)k
0inputs+0outputs (0major+2151minor)pagefaults 0swaps
==> 2 <==
0.98user 0.61system 0:03.20elapsed 49%CPU (0avgtext+0avgdata 8492maxresident)k
0inputs+0outputs (0major+2153minor)pagefaults 0swaps
==> 3 <==
0.97user 0.63system 0:03.26elapsed 49%CPU (0avgtext+0avgdata 8496maxresident)k
0inputs+0outputs (0major+2154minor)pagefaults 0swaps
- setenforce 0 doesn't have any impact
- nothing is logged to audit log (no AVCs seen during execution)
Note that enforcing/permissive isn't expected to make a difference, as labels are expected to be correctly maintained in both states. Enabled/disabled should make a difference, however.
Dan, is there any way can we get faster results from a selabel_open()/selabel_lookup()/selabel_close() call sequence in a way that doesn't leak resources if the library is being dlopen()ed/dlclose()d? Is there a still-newer API that would work better?
Well if you use the prefix stuff you should get better performance. We have added the ability to specify multiple prefixes.
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '16'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 16's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 16 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" and open it against that version of Fedora.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.