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

Sudheer Vinukonda commented on TS-3102:
---------------------------------------

Sure, thank you - comments are welcome :=)

The issue I am trying to address is more memory than performance although 
performance and even stability suffer as a consequence of poor memory reuse 
with Spdy. On our proxy hosts with 16g ram and 1g ram cache, we are noticing 
disk swapping every 1-2 days when spdy is enabled (which only clears after a 
restart). 

Needless to say, once swapping starts, things start going bad quickly. Some 
sample comparison numbers for memory reuse are posted in my earlier comment 
(also a snippet below). I will run the patch for longer to get a more definite 
comparison.

Without reuse:
-------------------
allocated | in-use | type size | free list name
-------------------|------------------|----------|---------------------------------
4507828224 | 975634432 | 32768 | memory/ioBufAllocator[8] 
1307574272 | 410095616 | 4096 | memory/ioBufAllocator[5] -
59375616 | 7501824 | 512 | memory/FetchSMAllocator 
29417472 | 16528512 | 672 | memory/httpClientSessionAllocator 
91193344 | 50746432 | 7744 | memory/httpSMAllocator 
25976832 | 3281376 | 224 | memory/spdyRequestAllocator

With reuse:
--------------
allocated | in-use | type size | free list name
-------------------|------------------|----------|---------------------------------
751828992 | 659357696 | 32768 | memory/ioBufAllocator[8]
531628032 | 501116928 | 4096 | memory/ioBufAllocator[5]
13631488 | 12464128 | 512 | memory/FetchSMAllocator
30535680 | 26612544 | 672 | memory/httpClientSessionAllocator
56500224 | 5064576 | 7744 | memory/httpSMAllocator
5963776 | 5453056 | 224 | memory/spdyRequestAllocator

> Reuse context memory for SPDY streams within a SPDY connection
> --------------------------------------------------------------
>
>                 Key: TS-3102
>                 URL: https://issues.apache.org/jira/browse/TS-3102
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: SPDY
>    Affects Versions: 5.0.1
>            Reporter: Sudheer Vinukonda
>            Assignee: Sudheer Vinukonda
>              Labels: yahoo
>             Fix For: 5.2.0
>
>         Attachments: TS-3102.diff
>
>
> In the present SPDY implementation in ATS, there is no client context reuse. 
> Though the spdy session is reused, each stream (even the non-concurrent ones) 
> is allocated a set of new/separate context buffers (including internal 
> plugin_vc, client_session, SM object, header heap, transaction buffers, 
> server session objects etc). Some of these objects are allocated from global 
> pool, while some are from per-thread pool. The context memory is not reused 
> unlike the non-spdy session, where there can be at most one transaction on a 
> given connection/session at a time.
> Besides being very inefficient (the allocation/deallocation) this also leads 
> to larger memory foot print over time, due to the relatively poor reuse of 
> per thread pool objects (especially, when there are a high number of threads 
> - e.g 100+ like we have).
> I am currently testing a patch that does not deallocate the streams when the 
> transaction completes and reuses those for new/subsequent streams.



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

Reply via email to