Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Updated revisions of libs: scodec 1.10, scalaz-stream 0.8.1, scalaz 7… #111

Merged
merged 1 commit into from Jun 2, 2016

Conversation

sbuzzard
Copy link

….1.8, commons-pool-2.4.2, netty 4.1.0, flush client request in pipeline to avoid ~1 sec lags, minimum of 4 default endpoint and worker threads to avoid 100 to 200ms lags with single CPU machines awaiting for free connection.

This subsumes PRs 106 - 108 and adds:
1.) update of scodec, scalaz-stream (0.8.x) and scalaz (7.1.x) to latest.
2.) sets a minimum for endpoint and worker threads when they are not set by client but default to num processors, as it has been observed that there were lags even when processing one request at a time when the thread pool were less than 4 due to non-connection use of the thread (overhead, decoding, encoding). The worker threads can be configured to be higher, obviously, but endpoint pool can't. If acceptable and it is desired to merge 106 - 108 individually, I can re-base this to just include the deltas. Or if it is desired just to bump the versions and not include the thread pool changes. @ahjohannessen, FYI ...
These changes constitutes the deltas from 1.4.3 which we are using in our application now.

@ahjohannessen
Copy link
Contributor

I think it is fine to merge this as whole. WDYT @timperrett ?

private[remotely] def fullyRead(s: Process[Task,BitVector]): Task[BitVector] = s.runFoldMap(x => x)

private[remotely] def fixedNamedThreadPool(name: String): ExecutorService =
Executors.newFixedThreadPool(Runtime.getRuntime.availableProcessors, namedThreadFactory(name))
Executors.newFixedThreadPool(Runtime.getRuntime.availableProcessors.max(4), namedThreadFactory(name))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this what one would always want?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They may not, it's true, and this isn't currently configurable. I'm going to remove this when I re-base as I don't believe it affects us (it was the worker threads going below 3 threads were we saw lags even when only sending one in at a time). This is only currently used by endpoint when you have multiple endpoints set.

@timperrett
Copy link
Contributor

@sbuzzard @ahjohannessen I think this looks like a great change set. If we can rebase to the latest master then we can get it merged in.

@sbuzzard sbuzzard force-pushed the bump-rev-min-threads-in-pool branch from a3cb9cd to 139e7b3 Compare May 31, 2016 17:03
@ahjohannessen
Copy link
Contributor

Probably smart to bump travis & build to use scala 2.11.8 as scodec, shapeless etc. are using 2.11.8 and macroparadise with 2.11.8

…e boost flushing pipeline, minimizing default worker threads and fix of concurrency bug in negotiation.
@sbuzzard sbuzzard force-pushed the bump-rev-min-threads-in-pool branch from 139e7b3 to 885f805 Compare May 31, 2016 23:15
@timperrett timperrett merged commit dccd7b0 into Verizon:master Jun 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants