One of the performance hits identified while analysing the JFR dumps taken out of EMM 2.0 set-ups is the time taken for token validation. The nature of the aforesaid token validation is that, a service stub is used to invoke an admin service deployed as part of EMM's Key Manager profile for token validation and the stub instances are created per-request to avoid the impact that is likely to be caused by stubs being less thread-safe. This pattern proved to be very expensive as it was quite evident that the stub instantiation is expensive. As a fix, a pool of stubs was introduced to mitigate the above explained impact with appropriate means to cleanup metadata just before the pooled stubs are returned to the pool. This helped doubling the numbers obtained for a properly distributed set-up of EMM 2.0. Please refer [1] for the source code.
[1] https://github.com/wso2/carbon-device-mgt/commit/11957f1e478f884cc1f100debb4bbc8290c0901c Cheers, Prabath On Mon, Dec 21, 2015 at 2:44 PM, Dileesha Rajapakse <[email protected]> wrote: > 1. Install Jmeter > *sudo apt-get install jmeter* > > 2. Replace the '*/usr/share/jmeter/lib/*' directory with the 'lib' > directory which could be downloaded from below link. (This file contains > all the necessary library files needed to run test scripts) > > https://drive.google.com/file/d/0B1raQ3vGHU8uMjlhZU1EVzR0VGc/view?usp=sharing > > 3. Download and extract the scripts file > > https://drive.google.com/file/d/0B1raQ3vGHU8uaXhULTZzQUQwamc/view?usp=sharing > > The above '*EMM200LoadTests.zip*' file contains a total of 5 files. > > - *emm_devices.csv *- Contains information about 500000 unique devices > - *EnrollDevices.jmx* - Enrolls Devices > - *AddOperations.jmx* - Adds Operations to enrolled devices (2 > operations per each device) > - *GetPendingOperations.jmx* - Hits the '/mdm-android-agent/operation' > endpoint which is the most heavily used API of the EMM > - *MDM2LoadTesting.jmx* - This script contains a sample Jmeter test > plan which has several additional useful test ThreadGroups which can be > used to simulate scenarios such as Operation Execution, Policy Creation and > Policy Monitoring > > *[Important]* Make sure the 'emm_devices.csv' file and the script files > are in the same folder. > 4. Specify these parameters when running test scripts > > *JHOST* --> Server Host > *JPORT* --> Server Port > *JUSERS* --> Number of Users (Concurrency) > *JLOOPCOUNT* --> Number of Iterations per User > > > Device Enrollment > > jmeter -n -JHOST=<specify_host> -JPORT=<specify_port> > -JUSERS=<specify_users> -JLOOPCOUNT=<specify_loops> -t EnrollDevices.jmx -l > errors.log > > > - To enroll a '*n*' number of devices set the parameters as follows, > *(-JUSERS)*(-JLOOPCOUNT) > = n* > > > Add Operations > > jmeter -n -JHOST=<specify_host> -JPORT=<specify_port> > -JUSERS=<specify_users> -JLOOPCOUNT=<specify_loops> -t AddOperations.jmx -l > errors.log > > > Get Pending Operations > > jmeter -n -JHOST=<specify_host> -JPORT=<specify_port> > -JUSERS=<specify_users> -JLOOPCOUNT=<specify_loops> -t > GetPendingOperations.jmx -l errors.log > > > -- > Dileesha Rajapakse > *Intern - Engineering* > Mobile : +94 (0) 772 555 933 > Tel : +94 112 741 505 > [email protected] > -- Prabath Abeysekara Technical Lead WSO2 Inc. Email: [email protected] Mobile: +94774171471
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
