Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3510F200BFE for ; Mon, 16 Jan 2017 16:13:17 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 339F0160B30; Mon, 16 Jan 2017 15:13:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 58CEA160B22 for ; Mon, 16 Jan 2017 16:13:16 +0100 (CET) Received: (qmail 19573 invoked by uid 500); 16 Jan 2017 15:13:15 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 19562 invoked by uid 99); 16 Jan 2017 15:13:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2017 15:13:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D9584C00B6 for ; Mon, 16 Jan 2017 15:13:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.38 X-Spam-Level: X-Spam-Status: No, score=0.38 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id o_Kd8t1kPJdJ for ; Mon, 16 Jan 2017 15:13:12 +0000 (UTC) Received: from mail-yb0-f181.google.com (mail-yb0-f181.google.com [209.85.213.181]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 377085F2C5 for ; Mon, 16 Jan 2017 15:13:12 +0000 (UTC) Received: by mail-yb0-f181.google.com with SMTP id j82so17654433ybg.1 for ; Mon, 16 Jan 2017 07:13:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=2p9QZV7LstWmOSQkv0kxTjCHuzHIUU1wJWHZll/PZSY=; b=PiCcEKnLNIK/i5U/sgcg87DV/hzQxuVpkyy7C1bwKN1ijdhahkfiwHSeLQtvcw7LwL W7Sy5XTk1v2cvxgpacZp8JiIaznGFsmuwygJQxy0oy9OFIr6pt+vOFFtovFp8vNS0anm srMRrzIC3tmYmIIQdl0MsgLsPSl9WBd9MU+HCcPf/rQ5350QXNLQNL5DDQGbc4B8kCLd P17U8I5EXhpGsKCziazgFGs4Hy9U+g6RMbvBWOogFoaCKESiIJ57Cc6CwGAYflxkzrVV OJigkDgnNXMqaR1iC4UGJrnDaPpq0LrAFPSlAyp44CtkGfC1kKqDETX3BI4S9Pf6vplz HUAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=2p9QZV7LstWmOSQkv0kxTjCHuzHIUU1wJWHZll/PZSY=; b=G4Kn25sGQ1a8rG++u8OlvqMBMfgtMGtOD0Ru/E8iDW3KOhqFL3kr0iCUB6QC+J1lT5 yyQOa8YVPN8InTfRyLCOyFE2z9ZKZpSuUpIfGrQ/SCix6yH80oYUVNIRXy7p37kPy/35 lGNzn2Sf8kA3TRA3S9otOXjsgzoaK3JhU0mPSt8RvW2OxEu0G+j1IVgiPoL9YXIIqEBk amWb8m/Jcn3srl1n4ydJCnJdaIDcdzosP+VBEvSUQZczfPSgXhlAqDtTCIcZzvOuiw/8 Hy/Qzi1mFKff0TPIhWASAMwV8D1BC3ct7ocMXIp/5u0JbU7op+CJTN1ImD4iRB3IS8MW YihA== X-Gm-Message-State: AIkVDXJ4dw41wIohol1EjzgIyHQplvmR7kkj2/R45wMJfxNemwTf8NLX2wQuq+avrXzp7YY9tBCbmXaRLEnR1g== X-Received: by 10.37.90.138 with SMTP id o132mr22368853ybb.39.1484579583616; Mon, 16 Jan 2017 07:13:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.114.196 with HTTP; Mon, 16 Jan 2017 07:13:03 -0800 (PST) In-Reply-To: <676755a2-a0c4-4c2d-006d-c7e01f7197c8@coolsigns.mobi> References: <676755a2-a0c4-4c2d-006d-c7e01f7197c8@coolsigns.mobi> From: sebb Date: Mon, 16 Jan 2017 15:13:03 +0000 Message-ID: Subject: Re: Correct configuration of JMeter for testing TPS allocated To: JMeter Users List Content-Type: text/plain; charset=UTF-8 archived-at: Mon, 16 Jan 2017 15:13:17 -0000 On 16 January 2017 at 13:26, alexk wrote: > Hello, > > I was given access to a web service API that implements a throttling policy > per user account. Each account has an allocated TPS. In my case the > allocated TPS is 80. > > The problem is that for many requests that I make to the API I get: "HTTP > Error 429 -- Too many requests try back in 1 second" even when I set my > client's TPS to 50. > > I am pretty confident about the throttling I am performing on my end (used > both Thread sleep and Guava's RateLimiter to test) and when I brought this > up with the API owner they asked me to test with JMeter as they have done > and they have certified that their API correctly implements TPS allocation. > > This is what I did. Testing from my production server's CLI with the > configuration I have attached (http_req.jmx) I received again 429 errors. > > The way I did the test is that I created a thread group with: > > Number of threads: 10 (which is the number of threads my Java client's > threadpool has configured) > Ramp-up Period: 10 > Loop count: Forever > > And a timer: > > Constant Throughput Timer: 4800 That looks fine, assuming the timer was set to calculate the throughput based on all the threads, not per thread. > They told me that they did the test in a different way: > > Number of threads: 80 > Ramp-up Period: 1 > Loop count: 1 > > I believe that their approach is not the correct way to perform the test as > it does only one time the request and for my case I face the issue after a > while. However, given my very limited exposure to JMeter I am not confident > enough about my claims and approach either. Their approach means the max throughput will depend on how quickly their server and JMeter get warmed up. It's hardly ever correct to use a loop count of 1. > Could someone confirm whether my approach is correct or indicate where I am > wrong. Also I would really appreciate if someone could give a brief > explanation to convey to the owner's testing team about any (if there are > any) flaws in their approach of using JMeter testing. See above. I had a quick look at the attached JMX. I would recommend disabling/removing the Tree View and Table Listeners as they are expensive. Add a Summary Listener instead, as that will show the throughput. Also you can replace the HTTP Sampler with a Java Request sampler. Set the sleep time/mask according to the expected response times from the server. You can then run the test and see how JMeter behaves. I just tried using the default sleep settings and it took quite a while for the throughput rate to build up to 40. If you know how long the test takes and how many requests were serviced you can manually calculate the average throughput as a cross check. As I recall, the Summary listener calculates the cumulative rate rather than the peak rate, so I suppose it would be possible for the server to see a temporary overload if it used a short measurement period. If you record basic test results (start time and elapsed should be enough) you can process the file to measure the gaps between the samples, in case that is how they are measuring TPS. > Thank you in advance > Alex > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org > For additional commands, e-mail: user-help@jmeter.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org For additional commands, e-mail: user-help@jmeter.apache.org