Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Properly return pooled blocks in SocketInput #580

Closed
halter73 opened this issue Jan 14, 2016 · 8 comments
Closed

Properly return pooled blocks in SocketInput #580

halter73 opened this issue Jan 14, 2016 · 8 comments

Comments

@halter73
Copy link
Member

When I was investigating #579, I discovered that all of the blocks getting finalized in the app I was using repro the issue were last leased by SocketInput.IncomingStart.

It appears that the last incoming block will never be returned even if it is fully consumed.

@DamianEdwards
Copy link
Member

This seems like a really simple fix, yes? If so, I'd like to see this done in RC2.

@muratg muratg added this to the 1.0.0-rc2 milestone Jan 22, 2016
@muratg
Copy link
Contributor

muratg commented Jan 22, 2016

If it's not a straightforward quick fix, let's move it to backlog

@benaadams
Copy link
Contributor

Measurement across 1M non keep-alive requests; majority of the highlighted byte[] is the blocks not being returned early enough from the SocketInput

non-keepalive-connections

@sajayantony
Copy link
Member

@sivagms - This might be the issue that Martin was trying to fix today due to the incorrect finalization. Do you want to take a look since you know the fix he was talking about?

@benaadams
Copy link
Contributor

@sajayantony I assumed it was in this fix? #623 (though haven't measured)

@sajayantony
Copy link
Member

btw.. @halter73 ryan has moved these benchmark and loadtest apps here

@benaadams 😫 I hadn't seen that PR and I've just joined this party :)

@benaadams
Copy link
Contributor

@halter73 added PR for how I generated this https://github.com/aspnet/Performance/pull/48

@martinpf
Copy link

I noticed this as well last Friday. Under load, with a significant number of new connections being made, the finalizer queue falls behind and the memory blocks waiting in the queue can quickly exceed 1 GB. A simple fix for this would be to return the block held by SocketInput on connection close.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants