This repository has been archived by the owner on Mar 11, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from sbuzzard/perf_changes_flush
Performance improvement, moving write and flush out of enframed and i…
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5cccaaf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbuzzard @timperrett seems like this change causes
DescribeSpec
to hang for some reason.5cccaaf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If changes in
Transport.scala
are reverted, thenDescribeSpec
works again. In general, as far as I can tell, is that you flush at the end of sending a request or a response, unless you are about to close the channel. I am not that well versed with Netty and such to tell what is the right thing to do here.5cccaaf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flushing at the end of the request was causing a ~1 second lag in requests (we went from a suite of 150 tests taking nearly 3 minutes to under 9 seconds and integration tests likewise). It could well have been a 4.0.x bug that is fixed in 4.1 - I'll try reverting that with 4.1 and trying with our test suite again.
5cccaaf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be of some inspiration: http://normanmaurer.me/presentations/2014-facebook-eng-netty/slides.html#1.0 :)
@sbuzzard Seems like there are many things to consider with respect to enqueuing and writing judging from those slides. Could you also just try the change with
Client.scala
and keep transport as before?5cccaaf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine now with Transport reverted so I'll rebase. I think the issue, in hindsight, was that netty 4.0.x (at least to the version being used in remotely) didn't have TCP_NODELAY set to true by default. I was reading through the issues the other week when I came across that thread. Thxs for the link, @ahjohannessen!
5cccaaf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine with Transport reverted - but still slow as it use to be with client also reverted.
5cccaaf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbuzzard we should keep client change, IMHO :)