large HTTP responses

29 views
Skip to first unread message

Alex Gleyzer

unread,
Jan 6, 2014, 11:29:09 AM1/6/14
to iago-...@googlegroups.com
I have tried to run Iago against a HTTP service that returns large responses, on average about 90kB. This seems to introduce a lot of GC activity in parrot-server JVM, making it unusable. I tried tweaking GC parameters, but so far haven't had much success. Does anyone have any tips for dealing with this situation? If there's some kind of way to "skip" reading the response body perhaps on Finagle or Netty level?

Thanks,
Alex

Tom Howland

unread,
Jan 6, 2014, 1:52:56 PM1/6/14
to iago-...@googlegroups.com
Did you try the following from README.md?

Sending Large Messages

By default, the parrot feeder sends a thousand messages at a time to each connected parrot server until the parrot server has one minutes worth of data. This is a good strategy when messages are small (less than a kilobyte). When messages are large, the parrot server will run out of memory. Consider an average message size of 100k, then the feeder will be maintaining an output queue for each connected parrot server of 100 million bytes. For the parrot server, consider a request rate of 2000, then 2000 * 60 * 100k = 12 gigabytes (at least). The following parameters help with large messages:

Parameter DescriptionRequired or
Default Value
batchSize

how many messages the parrot feeder sends at one time to the parrot server. For large messages, setting this to 1 is recommended.

Default:1000
cachedSeconds

How many seconds worth of data the parrot server will attempt to cache. Setting this to 1 for large messages is recommended. The consequence is that, if the parrot feeder garbage-collects, there will be a corresponding pause in traffic to your service unless cachedSeconds is set to a value larger than a typical feeder gc. This author has never observed a feeder gc exceeding a fraction of a second.

Default is20




--
 
---
You received this message because you are subscribed to the Google Groups "Iago Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iago-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Tom Howland

unread,
Jan 6, 2014, 1:59:25 PM1/6/14
to iago-...@googlegroups.com
Sorry. I sent you tips for large requests. You were asking about large responses. I'll investigate.

Alex Gleyzer

unread,
Jan 6, 2014, 2:06:11 PM1/6/14
to iago-...@googlegroups.com
Correct. Basically, things looks ok for 1000 requests per second, but anything above that results in a lot of GC and Iago reporting ridiculously long request latencies, with lots of requests expiring after 30 sec timeout. Any insight will be useful, thanks in advance :) 

Tom Howland

unread,
Jan 6, 2014, 2:53:28 PM1/6/14
to iago-...@googlegroups.com

Alex

What I suspect is happening is the parrot server has several asynchronous reads happening at once. When the rate goes up, the number of simultaneous reads go up. 3 ways of dealing with this:

  1. You would like to just tell parrot to ignore the response. I'm afraid I don't know how to do that. I'll post a query to the finaglers mailing list.

  2. Probably a better solution would be to give the parrot server lots of memory. I think you tried this but I'll suggest it anyway:

    serverXmx = 8000

    or more.

  3. Finally, you can always create more parrot servers.

Alex Gleyzer

unread,
Jan 6, 2014, 4:18:39 PM1/6/14
to iago-...@googlegroups.com
Thanks.
Reply all
Reply to author
Forward
0 new messages