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 8E7C4200CF8 for ; Thu, 14 Sep 2017 12:34:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8D7A11609CD; Thu, 14 Sep 2017 10:34:48 +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 060211609CC for ; Thu, 14 Sep 2017 12:34:47 +0200 (CEST) Received: (qmail 65363 invoked by uid 500); 14 Sep 2017 10:34:46 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@flink.apache.org Received: (qmail 65351 invoked by uid 99); 14 Sep 2017 10:34:46 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2017 10:34:46 +0000 Received: from aljoschas-mbp.fritz.box (dslb-094-222-124-158.094.222.pools.vodafone-ip.de [94.222.124.158]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id D224A1A023B; Thu, 14 Sep 2017 10:34:44 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Delay in Flink timers From: Aljoscha Krettek In-Reply-To: Date: Thu, 14 Sep 2017 12:34:42 +0200 Cc: user@flink.apache.org Content-Transfer-Encoding: quoted-printable Message-Id: <46FDF5D7-F7FD-436A-851F-3BB5D063060D@apache.org> References: <87bmmj2emv.fsf@vicarie> To: Chesnay Schepler X-Mailer: Apple Mail (2.3273) archived-at: Thu, 14 Sep 2017 10:34:48 -0000 Hi, Yes, execution of these methods is protected by a synchronized block. = This is not a fair lock so incoming data might starve timer callbacks. = What is the number of timers we are talking about here? Best, Aljoscha > On 11. Sep 2017, at 19:38, Chesnay Schepler wrote: >=20 > It is true that onTimer and processElement are never called at the = same time. >=20 > I'm not entirely sure whether there is any prioritization/fairness = between these methods > (if not if could be that onTimer is starved) , looping in Aljoscha who = hopefully knows more > about this. >=20 > On 10.09.2017 09:31, Narendra Joshi wrote: >> Hi, >>=20 >> We are using Flink as a timer scheduler and delay in timer execution = is >> a huge problem for us. What we have experienced is that as the number = of >> Timers we register increases the timers start getting delayed (for = more >> than 5 seconds). Can anyone point us in the right direction to figure >> out what might be happening? >>=20 >> I have been told that `onTimer` and `processElement` are called with = a >> mutually exclusive lock. Could this locking be the reason this is >> happening? In both the functions there is no IO happening and it = should >> not take 5 seconds. >>=20 >> Is it possible that calls to `processElement` starve `onTimer` calls? >>=20 >>=20 >> -- >> Narendra Joshi >>=20 >=20