Bug 819115 - Client library performance is bad (with default SELinux patch applied)
Summary: Client library performance is bad (with default SELinux patch applied)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: krb5
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-04 21:56 UTC by Petr Spacek
Modified: 2013-02-13 19:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-13 19:26:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
TGT request loop code (3.05 KB, text/x-csrc)
2012-05-04 21:56 UTC, Petr Spacek
no flags Details

Description Petr Spacek 2012-05-04 21:56:42 UTC
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):
krb5-1.9.3-1.fc16

How reproducible:
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


Additional info:
- setenforce 0 doesn't have any impact
- nothing is logged to audit log (no AVCs seen during execution)

Comment 1 Nalin Dahyabhai 2012-05-07 21:35:07 UTC
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?

Comment 2 Daniel Walsh 2012-05-08 14:37:38 UTC
Well if you use the prefix stuff you should get better performance.  We have added the ability to specify multiple prefixes.

Comment 3 Fedora End Of Life 2013-01-16 16:05:36 UTC
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Fedora End Of Life 2013-02-13 19:26:55 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.