[ 
https://issues.apache.org/jira/browse/TS-4309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15305552#comment-15305552
 ] 

ASF GitHub Bot commented on TS-4309:
------------------------------------

Github user shinrich commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/629#discussion_r64992940
  
    --- Diff: iocore/net/SSLNetVConnection.cc ---
    @@ -193,131 +193,121 @@ ssl_read_from_net(SSLNetVConnection *sslvc, EThread 
*lthread, int64_t &ret)
     {
       NetState *s = &sslvc->read;
       MIOBufferAccessor &buf = s->vio.buffer;
    -  IOBufferBlock *b = buf.writer()->first_write_block();
       int event = SSL_READ_ERROR_NONE;
       int64_t bytes_read = 0;
    -  int64_t block_write_avail = 0;
       ssl_error_t sslErr = SSL_ERROR_NONE;
       int64_t nread = 0;
     
       bool trace = sslvc->getSSLTrace();
       Debug("ssl", "trace=%s", trace ? "TRUE" : "FALSE");
     
    -  for (bytes_read = 0; (b != 0) && (sslErr == SSL_ERROR_NONE); b = 
b->next.get()) {
    -    block_write_avail = b->write_avail();
    +  bytes_read = 0;
    +  while (sslErr == SSL_ERROR_NONE) {
    +    int64_t block_write_avail = buf.writer()->block_write_avail();
    +    if (block_write_avail <= 0) {
    +      buf.writer()->add_block();
    +      block_write_avail = buf.writer()->block_write_avail();
    +      if (block_write_avail <= 0) {
    +        Warning("Cannot add new block");
    +        break;
    +      }
    +    }
    --- End diff --
    
    Good point.  Looking at the non-ssl version, it is tracking a max to read.  
We should do something similar in the ssl-case. 


> Reduced SSL upload/download speed after event loop change (TS-4260)
> -------------------------------------------------------------------
>
>                 Key: TS-4309
>                 URL: https://issues.apache.org/jira/browse/TS-4309
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: Susan Hinrichs
>            Assignee: Susan Hinrichs
>             Fix For: 7.0.0
>
>
> With the Eventloop changes of TS-4260 there are fewer spurious event loop 
> kicks.  This reveals stalls during upload and download on a lightly loaded 
> system.  Tidying up the net read/write loops and reactivating a never 
> triggered signal fixed the problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to