users@grizzly.java.net

Re: any way to make this faster/more scalable?

From: Ryan Lubke <ryan.lubke_at_oracle.com>
Date: Tue, 26 Jul 2011 14:20:31 -0700

On 7/26/11 11:02 AM, Jon Brisbin wrote:
> Can I change the readBufferSize based on Content-Length? This is
> really the question: is there any way (besides eliminating the buffer
> copy) to make this faster or more scalable?
>
> https://github.com/jbrisbin/node-vs-java-shootout/blob/master/src/main/groovy/shootout/UploadHandler.groovy
>
> It does fine now up to >100MB. But trying to upload a 1GB file is
> killing my CPU (GC maybe?). Just wondered if there aren't some
> micro-optimizations I can make to shave a few microseconds off here or
> there.

Have you tried decreasing the number of file writes you're performing
(i.e., increase the value for the number of bytes that must be received
before invoking the ReadHandler callbacks)?

>
>
> Thanks!
>
> Jon Brisbin
> http//jbrisbin.com
>
>