RE: How to improve the performance of SSL_Read

2007-05-23 Thread David Schwartz

> I want to reduce the reading the response time, so that the
> performance will get improve.
> I want to read all the bytes at a time.
> SSL_read API is taking much time to read all the bytes of the response
> from the server.
> First time it is going to read 112 bytes, then 1300 bytes,1460 
> bytes...etc.
> Instead of this reading the bytes in chunks in while loop, i want to
> read all the bytes at a time.
> Could you please suggest me any other API to read all the bytes at a time.
> Please send me any example code of this scenario where i can read  all
> the bytes at a time.

SSL_read is giving you as many bytes as it has. The problem is not in the 
SSL_read but either in the sending side or the network between them. You can 
confirm this with a tool like 'tcpdump'.

DS


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: How to improve the performance of SSL_Read

2007-05-23 Thread Rick Jones

ghouse mohiddin wrote:

Hi Rick,

Thanks for your reply.

I want to reduce the reading the response time, so that the
performance will get improve.
I want to read all the bytes at a time.
SSL_read API is taking much time to read all the bytes of the response
from the server.
First time it is going to read 112 bytes, then 1300 bytes,1460 bytes...etc.
Instead of this reading the bytes in chunks in while loop, i want to
read all the bytes at a time.
Could you please suggest me any other API to read all the bytes at a time.
Please send me any example code of this scenario where i can read  all
the bytes at a time.


That does presume I suspect you know in advance how many bytes there are 
going to be.


What you need is support for the "water marks" in the socket layer.  Not 
all sockets implementations actually support them.  On those which do, 
you can tell the stack the socket is not to be considered "readable" 
until N bytes are present.


That you are getting the data in bits and peices suggests that your 
receiver is fast enough to stay ahead of the network, which is a good thing.


That your code does those reads for 5 to 6 seconds suggests that it is 
taking 5 to 6 seconds to get the data to your receiver.  Even if you 
read in on one swell foop (one fell swoop) it would still be 5 to 6 
seconds.  Depending on the specifics of the connection (can youshare 
details/) perhaps there are some packet losses happening.


rick jones



Thanks in Advance,
Ghouse...


On 5/22/07, Rick Jones <[EMAIL PROTECTED]> wrote:


ghouse mohiddin wrote:
> Hi,
>
> How to improve the performance of the SSL Read call?. Is there any
> call to increase the Buffercapacity.
>
> I am able to read around 1300 bytes at a time.
> It is taking 5 to 6 seconds for reading the whole response (Header and
> Body)from the server which is very slow.

1300 bytes at a time sounds like one TCP segment at a time.  How much
data in total are you reading in those 5 to 6 seconds?  If there really
isn't all that much data, perhaps the sender is having to retransmit
some of it.  Check the netstat statistics and link-level statistics on
both ends and look for drops, errors, retransmissions and the like.

rick jones
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: How to improve the performance of SSL_Read

2007-05-23 Thread ghouse mohiddin

Hi Rick,

Thanks for your reply.

I want to reduce the reading the response time, so that the
performance will get improve.
I want to read all the bytes at a time.
SSL_read API is taking much time to read all the bytes of the response
from the server.
First time it is going to read 112 bytes, then 1300 bytes,1460 bytes...etc.
Instead of this reading the bytes in chunks in while loop, i want to
read all the bytes at a time.
Could you please suggest me any other API to read all the bytes at a time.
Please send me any example code of this scenario where i can read  all
the bytes at a time.

Thanks in Advance,
Ghouse...


On 5/22/07, Rick Jones <[EMAIL PROTECTED]> wrote:

ghouse mohiddin wrote:
> Hi,
>
> How to improve the performance of the SSL Read call?. Is there any
> call to increase the Buffercapacity.
>
> I am able to read around 1300 bytes at a time.
> It is taking 5 to 6 seconds for reading the whole response (Header and
> Body)from the server which is very slow.

1300 bytes at a time sounds like one TCP segment at a time.  How much
data in total are you reading in those 5 to 6 seconds?  If there really
isn't all that much data, perhaps the sender is having to retransmit
some of it.  Check the netstat statistics and link-level statistics on
both ends and look for drops, errors, retransmissions and the like.

rick jones
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: How to improve the performance of SSL_Read

2007-05-22 Thread Rick Jones

ghouse mohiddin wrote:

Hi,

How to improve the performance of the SSL Read call?. Is there any
call to increase the Buffercapacity.

I am able to read around 1300 bytes at a time.
It is taking 5 to 6 seconds for reading the whole response (Header and
Body)from the server which is very slow.


1300 bytes at a time sounds like one TCP segment at a time.  How much 
data in total are you reading in those 5 to 6 seconds?  If there really 
isn't all that much data, perhaps the sender is having to retransmit 
some of it.  Check the netstat statistics and link-level statistics on 
both ends and look for drops, errors, retransmissions and the like.


rick jones
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]