Hi, I'm trying to run a simple benchmark on Flink streaming reduce. It seems it is very slow. Could you let me know if I'm doing something wrong.public class StreamingReduce {Thanks, |
Hi,
First of all learn about what’s going with your job: check the status of the machines, cpu/network usage on the cluster. If CPU is not ~100%, analyse what is preventing the machines to work faster (network bottleneck, locking, blocking operations etc). If CPU is ~100%, profile the TaskManagers to see what can you speed up. In your example couple of questions: - you create CollectiveData instances with size 128000 by default. Doesn’t it mean that your records are gigantic? I can not tell, since you didn’t provide full code. - you are mapping the data to new Tuple2<Integer, CollectiveData>(0, s); and then keying by the first field, which is always 0. Probably all of the records are ending up on one single machine Piotrek
|
Thanks Piotrek, I did it this way on purpose to see how Flink performs. With 128000 messages it takes an un-reasonable amount of time for Flink to complete the operation. With another framework the same operation completes in about 70 seconds for 1000 messages of size 128000, while Flink takes hours.On Thu, Mar 1, 2018 at 3:58 AM, Piotr Nowojski <[hidden email]> wrote:
-- Supun Kamburugamuve Member, Apache Software Foundation; http://www.apache.org E-mail: [hidden email]rg; Mobile: +1 812 219 2563 |
Are you sure the program is doing anything at all? Do you call execute() on the StreamExecutionEnvironment?2018-03-01 15:55 GMT+01:00 Supun Kamburugamuve <[hidden email]>:
|
Yes, the program runs fine, I can see it on the UI. Sorry, didn't include the part where the execute is called. Thanks,On Thu, Mar 1, 2018 at 10:27 AM, Fabian Hueske <[hidden email]> wrote:
-- Supun Kamburugamuve Member, Apache Software Foundation; http://www.apache.org E-mail: [hidden email]rg; Mobile: +1 812 219 2563 |
Few quick checks:
- Do you properly set the parallelism? - If you start 640 tasks (parallelism), and you use the same key for everything, that behaves like parallelism 1 (Piotr mentioned this) - Do you use the RocksDB state backend? If yes, try the FsStateBackend. It looks like your state data type object (CollectiveData) is very expensive to serialize and for RocksDB, you get a back and forth serialization (off-heap => on-heap, compute, on-heap => off-heap) On Thu, Mar 1, 2018 at 4:32 PM, Supun Kamburugamuve <[hidden email]> wrote:
|
Is there a way to not go between RocksDB? For this test application it seems not necessary as we don't expect fault tolerance and this is an streaming case. Thanks,On Thu, Mar 1, 2018 at 11:55 AM, Stephan Ewen <[hidden email]> wrote:
-- Supun Kamburugamuve Member, Apache Software Foundation; http://www.apache.org E-mail: [hidden email]rg; Mobile: +1 812 219 2563 |
Hi,
If you didn't configure your program to use RocksDB then you're already not using RocksDB. I think the main issue, as others have pointed out, is that by keying on a constant key you're essentially turning your program into a parallelism-of-1 program, thereby wasting almost all cluster resources. Best, Aljoscha
|
Free forum by Nabble | Edit this page |