Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jersey-dev] [External] : Performance dip from Jersey 1 to Jersey 2
  • From: Jan Supol <jan.supol@xxxxxxxxxx>
  • Date: Mon, 21 Mar 2022 12:58:11 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SiGhyF1mBaSWrSGwnXRMo2rNaYtp8/1TgwOnGKy2lbQ=; b=lYelSToLDVVWJwREL64d5A6CkEig1uL/sRT1q+6uuhIxGZ9l7N9NSjYCLekTQeudo0YI/ebjWZ9ozWj/YUGrsBY6Fq3jRg3JBrpnJy4HXjhAem+3npKeeD3tbRRaOBl3JwQKP3R5O2WeifT2SgQ9tNH7fCT0iiorf5qvxUN6ZtEYKOL9rd6SQoTM682f/840n/wbf105HDf26qZloY2btG6ga3jcOx2xOaEC43aJ41dhy/eL1AdnM4kF42849k9gdla80A1hc7AqwswCXGKRUuQ9z9mlflVbrfC60olTjLEZY9IKxq0pk857sC+7lGglF+lqBPNaIel2L/O1v3kB2w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YisR68nGq/yVOATpREKSAvv/yGSb7WnQLicrHvxz7LrC7b0HUgJeR0d15hYMkEe9171F/NSYAL5Bzd359eRoj5ZbCqrfD4QNowOBbWeTorH2DZtj87cYy4O8NBXcV8t4VvVla7NV3BoTr5/oy20ehwMaM0p27wAWnZh83gvx6OsxemVA3FWf7OL87h5RbDi+UDl25366vgvreDEjNSaYJsjmNtT5IJBS0Irl6fNh5vV3uJiWQ/+SmDqyPscJOjhRWEEPveHQZzHhcBeUZx8UO3XignyurGaTad8hfHwwlpPLssDql6SnGbIqTfr9xeQ0ml6HX0WKsn4jiBZ45a4gog==
  • Delivered-to: jersey-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/jersey-dev/>
  • List-help: <mailto:jersey-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/jersey-dev>, <mailto:jersey-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/jersey-dev>, <mailto:jersey-dev-request@eclipse.org?subject=unsubscribe>
  • Suggested_attachment_session_id: 037decb5-8e49-9e79-f25b-fb9dfb019481
  • Thread-index: AQHYNOBGR1AFUcEB4EeCr7yVqno2j6y5zziAgAS534CAC1BPeA==
  • Thread-topic: [jersey-dev] [External] : Performance dip from Jersey 1 to Jersey 2

Hi Nagesh,
I have created https://github.com/eclipse-ee4j/jersey/issues/5011 for the issue. Feel free to add any more findings there.

Jersey 1/JAX-RS 1.1 does quite a lesser number of operations than Jersey 2/JAX-RS 2.1, so it might take a few more millis. But your dip seems to be much bigger than this, and I am not sure what could be the reason. There might be the effect of the first request, the first request takes much longer than the consecutive requests, as there is some lazy initialization going on and some warming up. Can you see the difference when you send multiple requests, too?

We plan to focus on performance during the next weeks we'll check your use case.

Thanks,
Jan


From: jersey-dev <jersey-dev-bounces@xxxxxxxxxxx> on behalf of Nagesh Soni <nageshsoni393@xxxxxxxxx>
Sent: Monday, March 14, 2022 8:59 AM
To: jersey developer discussions <jersey-dev@xxxxxxxxxxx>
Subject: Re: [jersey-dev] [External] : Performance dip from Jersey 1 to Jersey 2
 
Thanks Jürgen for replying to an otherwise quiet community now :)
And sorry for the hasty query last time around. Let me explain how my
service looks like and my findings so far.
I have a simple GET service which returns a JSON response (I am now
using GET to narrow down the scope of troubleshooting):

@GET
@Produces({ "application/json" })
@io.swagger.annotations.ApiOperation(value = "", notes = "Returns all
users from the system.", response = List.class, responseContainer =
"List", tags={ })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "user
response", response = User.class, responseContainer = "List"),

@io.swagger.annotations.ApiResponse(code = 200, message = "unexpected
error", response = Error.class) })
public Response getUsers(@Context SecurityContext securityContext )
throws NotFoundException {
return allUsers(securityContext );
}

My web.xml looks like this:

<servlet>
<servlet-name>jersey</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.classnames</param-name>
<param-value>
com.e.s.api.UsersApi,
com.e.s.api.JacksonJsonProvider
</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.wadl.disableWadl</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>

My finding so far from profiling this API is that it's taking almost
200-800ms between the filter and my resource method. While Jersey1
takes around 50-100ms.
I doubt whether Jersey is taking this much time in resolving the
Resource and sub-resource. Looking for leads on possible reasons for
this?
My next step is to use the RequestEventListener in further narrowing
down the step that takes this much time.
Any leads are much appreciated

Thanks & Regards,
Nagesh Soni

On Fri, 11 Mar 2022 at 13:19, Jürgen Albert <j.albert@xxxxxxxxxxxxxxxxxx> wrote:
>
> Hi Nagesh,
>
> I'm not part of the jersey developer team and I'm just subscribed to this list to listen in. As contributor and maintainer of other OSS projects I have to comment though.
>
> You appear to be a software developer yourself. So please read what you have send to the list so far and ask yourself what answers you could give, if somebody send something like this to you about your product/project. Alternatively show it to a friend and ask him.
>
> Till now you wrote a mail to a VW car workshop and said that you switched from and 1980s beetle to a 2021 Version and it appears to be slower. Your answer to a question for details was: I drive, refuel with regular and shifting takes me longer...
>
> If you want free help from the community please give them something to work with.
>
> Respectfully,
>
> Jürgen.
>
> Am 11/03/2022 um 01:37 schrieb Nagesh Soni:
>
> We accept JSON and send JSON in response and we see that the request takes some seconds between filter and application.
> 3rd party lib for JSON : Jackson
>
> On Thu, 10 Mar 2022, 7:57 pm Jan Supol, <jan.supol@xxxxxxxxxx> wrote:
>>
>> Hi, can you please be more specific in what you do in your app to see the throughput dip? Is it just a sequence of HTTP requests, is it SSE communication, or something else? Do you use some 3rd party lib such as for json?
>> -- Jan
>> ________________________________
>> From: jersey-dev <jersey-dev-bounces@xxxxxxxxxxx> on behalf of Nagesh Soni <nageshsoni393@xxxxxxxxx>
>> Sent: Thursday, March 10, 2022 10:51 AM
>> To: jersey-dev@xxxxxxxxxxx <jersey-dev@xxxxxxxxxxx>
>> Subject: [External] : [jersey-dev] Performance dip from Jersey 1 to Jersey 2
>>
>> Hi Team,
>>
>> I am facing a throughput dip switching from Jersey1 to Jersey2 while
>> using jetty server. Is there any known reason why this dip can occur?
>>
>> Jersey1 version: 1.19.4
>> Jersey2 version: 2.29
>> Jetty version: 9.4.43.v20210629
>>
>> Thanks & Regards,
>> Nagesh Soni
>> _______________________________________________
>> jersey-dev mailing list
>> jersey-dev@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jersey-dev__;!!ACWV5N9M2RV99hQ!dN1cq9aZtpaMPgR-nycyTL2DqDoUVbFVPylDbJ3m4vg-A9Jw_9i5OhRGgxO8ZX0P$
>> _______________________________________________
>> jersey-dev mailing list
>> jersey-dev@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jersey-dev__;!!ACWV5N9M2RV99hQ!eUqBuCMEoT25QLWntbe4d2XcIasGKNHB68yPquU4iQCfWFPVauZ63DwAQNLWN843$
>
>
> _______________________________________________
> jersey-dev mailing list
> jersey-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jersey-dev__;!!ACWV5N9M2RV99hQ!eUqBuCMEoT25QLWntbe4d2XcIasGKNHB68yPquU4iQCfWFPVauZ63DwAQNLWN843$
>
> --
> Jürgen Albert
> CEO
> Chair Eclipse OSGi Working Group Steering Committee
>
>
> Data In Motion Consulting GmbH
>
> Kahlaische Str. 4
> 07745 Jena
>
> Mobil:  +49 157-72521634
> E-Mail: j.albert@xxxxxxxxxxxxxxx
> Web: https://urldefense.com/v3/__http://www.datainmotion.de__;!!ACWV5N9M2RV99hQ!eUqBuCMEoT25QLWntbe4d2XcIasGKNHB68yPquU4iQCfWFPVauZ63DwAQMQV33BM$
>
> XING:   https://urldefense.com/v3/__https://www.xing.com/profile/Juergen_Albert5__;!!ACWV5N9M2RV99hQ!eUqBuCMEoT25QLWntbe4d2XcIasGKNHB68yPquU4iQCfWFPVauZ63DwAQLYESgHn$
> LinkedIn: https://urldefense.com/v3/__https://www.linkedin.com/in/juergen-albert-6a1796/__;!!ACWV5N9M2RV99hQ!eUqBuCMEoT25QLWntbe4d2XcIasGKNHB68yPquU4iQCfWFPVauZ63DwAQITed5hU$
>
> Rechtliches
>
> Jena HBR 513025
>
> _______________________________________________
> jersey-dev mailing list
> jersey-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jersey-dev__;!!ACWV5N9M2RV99hQ!eUqBuCMEoT25QLWntbe4d2XcIasGKNHB68yPquU4iQCfWFPVauZ63DwAQNLWN843$
_______________________________________________
jersey-dev mailing list
jersey-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jersey-dev__;!!ACWV5N9M2RV99hQ!eUqBuCMEoT25QLWntbe4d2XcIasGKNHB68yPquU4iQCfWFPVauZ63DwAQNLWN843$

Back to the top