#1023 Improve performance of the framework
Closed: Fixed None Opened 13 years ago by admiyo.

I have a dataset of 900 users. I've been running ipa-user find against it an seeing a response time pretty consistant of 40 seconds. Running a singe LDAP query:

time ldapsearch -x -D "cn=Directory Manager" -w freeipa4all -b "cn=users,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com" -H ldap://hostname

gives times of:

real 0m0.187s
user 0m0.023s
sys 0m0.074s

where as:
time ipa user-find

real 0m44.300s
user 0m1.027s
sys 0m0.150s

The VM this is running in is not huge:

1 virtual CPU with
cpu MHz : 2500.278
cache size : 4096 KB

meminfo
MemTotal: 1023096 kB
MemFree: 39584 kB

But it isn't hitting swap.

I'll attach the dataset.


to put the dataset into a machine without the batch row limit, just run
curl -v 2 -H "Content-Type:application/json" 3 -H "Accept:applicaton/json"4 --negotiate -u : 5 --cacert /etc/ipa/ca.crt 6 -d @long_userlist.json -X POST https://hostname/ipa/json

part 1 of 3 for split long user list
long_userlist-1.json

This is bad but can we do something about it? Is there a way to profile it?

After some inspection, this is not as bad as originaly posted. I installed IPA directly on my LAptop, no Virtualization overhead and decent amount of resources. Tee same query now only requires 3 seconds to run, so I suspect the VM was running into memory constraints. I have a larger User data set (5k users) that I will try and see if it breaks things

After doing some profiling, I found the bottleneck was in the calls to the LDAP server. THe Virtual Machine was set up with one VCPU, which meant that there had to be a complete context switch and switch back before the RPC could return. When I added an additional VCPU to the VM, the bottleneck went away.

cache get_ipa_config() output in request context
freeipa-rcrit-759-cache.patch

Patch 759 committed as:

master: e1ef080

ipa-2-0: caab2aa

Metadata Update from @admiyo:
- Issue assigned to rcritten
- Issue set to the milestone: FreeIPA 2.1 - 2011/06

7 years ago

Login to comment on this ticket.

Metadata