jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vance Zhao <vancez...@gmail.com>
Subject Re: Perl5Matcher cause CPU spike during the test when paring big response
Date Thu, 27 Jun 2013 08:47:30 GMT
Just notice the format of this email. Please ingore it I will send it again


On Thu, Jun 27, 2013 at 4:44 PM, Vance Zhao <vancezhao@gmail.com> wrote:

> Hi,
>
> Don't know if we have discussed this before but I found the regex lib we
> used --"org.apache.oro.text.regex.Perl5Matcher"
> <http://jakarta.apache.org/oro/>which will consume CPU spike time during
> the load testing.
>
>
>
> The response return in my case is soap which format as:
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
>    <soap:Body xmlns:ns1="http://rfp.testdomain.testdomain.com/api/v4_0">
>       <ns4:getRfpResponse xmlns="
> http://common.testdomain.testdomain.com/api/v1_0" xmlns:ns2="
> http://rfp.testdomain.testdomain.com/v4_0" xmlns:ns3="
> http://contact.testdomain.testdomain.com/v1_0" xmlns:ns4="
> http://rfp.testdomain.testdomain.com/api/v4_0" xmlns:ns5="
> http://common.testdomain.testdomain.com/v1_0">
>          <ns4:rfp>
>             <ns2:RfpOID>4DBC8638-BBE0-4626-97D6-004F111F0C2B</ns2:RfpOID>
>             <ns2:RfpName>Test</ns2:RfpName>
>             <ns2:RfpTitle>Test</ns2:RfpTitle>
>             <ns2:RfpLabel>12110</ns2:RfpLabel>
>             <ns2:Source>Test</ns2:Source>
>             <ns2:AttendeeQuantity>37</ns2:AttendeeQuantity>
>             <ns2:PlannerPreferredMeetingDate>
>                <ns2:ShoulderStartDate>2010-01-11</ns2:ShoulderStartDate>
>                <ns2:MeetingStartDate>2010-01-12</ns2:MeetingStartDate>
>                <ns2:MeetingEndDate>2010-01-15</ns2:MeetingEndDate>
>             </ns2:PlannerPreferredMeetingDate>
>
> .................................................................................
>
>  The regex pattern I use is: <(.*)RfpOID>(.*)</(.*)RfpOID> to grape the
> rfpOID for this response due to the namesapce prex "ns2" changes sometime
> and the response of this api around big to 65k.
>
>  The CPU will be eat quickly when I use 20 threads user load
>
> *20 Threads*
>
>
>
> And the thread dump from Jmeter is saying mosto the Jmeter Thread is
> running for *Perl5Matcher*
> *
> "Before_getRfp 1-10" prio=6 tid=0x03067c00 nid=0x4874 runnable [0x04d8f000]
>    java.lang.Thread.State: RUNNABLE
>     at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source)
>     at org.apache.oro.text.regex.Perl5Matcher.__match(Unknown Source)
>     at org.apache.oro.text.regex.Perl5Matcher.__tryExpression(Unknown
> Source)
>     at org.apache.oro.text.regex.Perl5Matcher.__interpret(Unknown Source)
>     at org.apache.oro.text.regex.Perl5Matcher.contains(Unknown Source)
>     at
> org.apache.jmeter.extractor.RegexExtractor.matchStrings(RegexExtractor.java:234)
>     at
> org.apache.jmeter.extractor.RegexExtractor.processMatches(RegexExtractor.java:219)
>     at
> org.apache.jmeter.extractor.RegexExtractor.process(RegexExtractor.java:118)
>     at
> org.apache.jmeter.threads.JMeterThread.runPostProcessors(JMeterThread.java:737)
>     at
> org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:438)
>     at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
>     at java.lang.Thread.run(Unknown Source)*
>
> Also, the single thread load also will jump to 25% CPU utilization
>
> *Single Thread*
>
>
>
> Also provide the profiling from visualvm ( big overhead from this tool ,
> though just for quick reference...)
>
>
>
>
> After that, I did some tests to compare Perl5Matcher with other Java perl5
> regex lib  ( I use jregex). Please check my code attached.
>
> Time for using org.apache.oro.text.regex.Perl5Matcher 3801(ms)
>
> Time for using jregex 13(ms)
> *
> *
> Thanks for reading so long but I'd like to know if we can user other regex
> lib for Jmeter.
>
> Vance*
> *
> *
>
> *
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message