You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Dave Bagguley <da...@hotmail.com> on 2006/10/30 16:32:48 UTC

Encryption and decryption performance issues

Hello.

I have some code in which a client calls a service, this service's callback 
handler then acts as a client to another service using encryption on both 
the request and response flow. Encryption is then used on the response flow 
from the original service and the client.

I have noticed some very major time issues with this set up.  The 
communication between the two services is very fast but communication 
between the service and the client takes a long time. I have used TCPMonitor 
and discovered that the encrypted message arrives back at the client very 
quickly but it takes 10 seconds for the message to be decrypted and the 
service output to be printed to the screen.

Is this length of time usual? Why is it so much faster between the two 
services?

Thanks,
Dave

_________________________________________________________________
Download the new Windows Live Toolbar, including Desktop search! 
http://toolbar.live.com/?mkt=en-gb


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: Encryption and decryption performance issues

Posted by Dave Bagguley <da...@hotmail.com>.
Hi, I've done some more testing and found that when multiple calls are made 
it's only the first call that takes along time, after that the speed is very 
good.  I think it's something to do with the crypto engines needing to 
initialise.  The speed between services is fast because the crypto engines 
only need to be initialised once per deployment.

>From: "Ruchith Fernando" <ru...@gmail.com>
>To: "Dave Bagguley" <da...@hotmail.com>
>CC: wss4j-dev@ws.apache.org
>Subject: Re: Encryption and decryption performance issues
>Date: Sun, 5 Nov 2006 20:08:57 +0530
>
>Hi Dave,
>
>On 10/30/06, Dave Bagguley <da...@hotmail.com> wrote:
>>Hello.
>>
>>I have some code in which a client calls a service, this service's 
>>callback
>>handler then acts as a client to another service using encryption on both
>>the request and response flow. Encryption is then used on the response 
>>flow
>>from the original service and the client.
>>
>>I have noticed some very major time issues with this set up.  The
>>communication between the two services is very fast but communication
>>between the service and the client takes a long time. I have used 
>>TCPMonitor
>>and discovered that the encrypted message arrives back at the client very
>>quickly but it takes 10 seconds for the message to be decrypted and the
>>service output to be printed to the screen.
>>
>>Is this length of time usual? Why is it so much faster between the two
>>services?
>
>it doesn't sound usual. Can the time difference be due to the amount
>of payload and the processing capabilities of the box the client runs?
>
>Which versions of WSS4J and xml-security are you using?
>
>Thanks,
>Ruchith
>
>>
>>Thanks,
>>Dave
>>
>>_________________________________________________________________
>>Download the new Windows Live Toolbar, including Desktop search!
>>http://toolbar.live.com/?mkt=en-gb
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>
>>
>
>
>--
>www.ruchith.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>

_________________________________________________________________
Windows Live™ Messenger has arrived. Click here to download it for free! 
http://imagine-msn.com/messenger/launch80/?locale=en-gb


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: Encryption and decryption performance issues

Posted by Dave Bagguley <da...@hotmail.com>.
Hi, I've done some more testing and found that when multiple calls are made 
it's only the first call that takes along time, after that the speed is very 
good.  I think it's something to do with the crypto engines needing to 
initialise.  The speed between services is fast because the crypto engines 
only need to be initialised once per deployment.

>From: "Ruchith Fernando" <ru...@gmail.com>
>To: "Dave Bagguley" <da...@hotmail.com>
>CC: wss4j-dev@ws.apache.org
>Subject: Re: Encryption and decryption performance issues
>Date: Sun, 5 Nov 2006 20:08:57 +0530
>
>Hi Dave,
>
>On 10/30/06, Dave Bagguley <da...@hotmail.com> wrote:
>>Hello.
>>
>>I have some code in which a client calls a service, this service's 
>>callback
>>handler then acts as a client to another service using encryption on both
>>the request and response flow. Encryption is then used on the response 
>>flow
>>from the original service and the client.
>>
>>I have noticed some very major time issues with this set up.  The
>>communication between the two services is very fast but communication
>>between the service and the client takes a long time. I have used 
>>TCPMonitor
>>and discovered that the encrypted message arrives back at the client very
>>quickly but it takes 10 seconds for the message to be decrypted and the
>>service output to be printed to the screen.
>>
>>Is this length of time usual? Why is it so much faster between the two
>>services?
>
>it doesn't sound usual. Can the time difference be due to the amount
>of payload and the processing capabilities of the box the client runs?
>
>Which versions of WSS4J and xml-security are you using?
>
>Thanks,
>Ruchith
>
>>
>>Thanks,
>>Dave
>>
>>_________________________________________________________________
>>Download the new Windows Live Toolbar, including Desktop search!
>>http://toolbar.live.com/?mkt=en-gb
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>
>>
>
>
>--
>www.ruchith.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>

_________________________________________________________________
Windows Live™ Messenger has arrived. Click here to download it for free! 
http://imagine-msn.com/messenger/launch80/?locale=en-gb


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: Encryption and decryption performance issues

Posted by Ruchith Fernando <ru...@gmail.com>.
Hi Dave,

On 10/30/06, Dave Bagguley <da...@hotmail.com> wrote:
> Hello.
>
> I have some code in which a client calls a service, this service's callback
> handler then acts as a client to another service using encryption on both
> the request and response flow. Encryption is then used on the response flow
> from the original service and the client.
>
> I have noticed some very major time issues with this set up.  The
> communication between the two services is very fast but communication
> between the service and the client takes a long time. I have used TCPMonitor
> and discovered that the encrypted message arrives back at the client very
> quickly but it takes 10 seconds for the message to be decrypted and the
> service output to be printed to the screen.
>
> Is this length of time usual? Why is it so much faster between the two
> services?

it doesn't sound usual. Can the time difference be due to the amount
of payload and the processing capabilities of the box the client runs?

Which versions of WSS4J and xml-security are you using?

Thanks,
Ruchith

>
> Thanks,
> Dave
>
> _________________________________________________________________
> Download the new Windows Live Toolbar, including Desktop search!
> http://toolbar.live.com/?mkt=en-gb
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>


-- 
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: Encryption and decryption performance issues

Posted by Ruchith Fernando <ru...@gmail.com>.
Hi Dave,

On 10/30/06, Dave Bagguley <da...@hotmail.com> wrote:
> Hello.
>
> I have some code in which a client calls a service, this service's callback
> handler then acts as a client to another service using encryption on both
> the request and response flow. Encryption is then used on the response flow
> from the original service and the client.
>
> I have noticed some very major time issues with this set up.  The
> communication between the two services is very fast but communication
> between the service and the client takes a long time. I have used TCPMonitor
> and discovered that the encrypted message arrives back at the client very
> quickly but it takes 10 seconds for the message to be decrypted and the
> service output to be printed to the screen.
>
> Is this length of time usual? Why is it so much faster between the two
> services?

it doesn't sound usual. Can the time difference be due to the amount
of payload and the processing capabilities of the box the client runs?

Which versions of WSS4J and xml-security are you using?

Thanks,
Ruchith

>
> Thanks,
> Dave
>
> _________________________________________________________________
> Download the new Windows Live Toolbar, including Desktop search!
> http://toolbar.live.com/?mkt=en-gb
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>


-- 
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org