Hi Team, I am configuring a Flink Job that can han...
# troubleshooting
k
Hi Team, I am configuring a Flink Job that can handle almost 1 million data per second, I have started with below configuration CPU: 4 cores Memory: 2GB Task Slots: 4 with only 30k logs per second But my job still goes too much busy and have a much backpressure, As far as I read that Flink can handle very large amount of data But here is some contradict, I might miss out some of the configuration, So can anybody help me to figure out it would be highly appreciate Thank you in advance πŸ™
n
You can try increasing parallelism for operator which seems to be more busy, during heavy load.
k
@Nishant Goenka i have tried that but no success. Do you have any idea like what other thing i need to increase if i increase parallelism I have tried by increasing memory of Flink but again no success
f
which kind of sink are you using?
k
Kafka
@Felipe Quirce I have also tried by Async method but I do not see any major improvement
s
i have earlier faced the similar kind issue with kafka sink(may not be same). that time turns out that job was having issue and was waiting for late events. in jour job can you add
senv.getExecutionPlan()
and collect the json response and check if there is anything you can find. Also, very different thought 1. Can you check the Bandwidth of the instance with kafka cluster
k
okay, other thing as I see flamegraph It looks like major issue is of serialization Like I want to perform some kind of enrichment and filter like thing on my incoming stream, So @Samrat Deb @Felipe Quirce Do you suggest any best serializer, I have tried for Kryo but it is taking too much time and CPU
πŸ‘ 1
Any other input anyone?
s
Please avoid using kryo fallback. Are u using avro or protobuf formats?
Sources and Sinks can always be bottlneck. One thing u can try is lesser parallelism for sources and sinks. Higher parallelism for the map/flatmap or any other operator that handles ur business logic. In you case , u can try setting higher parallelism for your co process function that handles broadcast state. Also it depends on your sink - kafka can handle 30k qps . You need to check if CPU usage is high in ur kafka cluster side also.
k
@Sumit Nekar I have tried to avoid Kryo by disabling a generic type, But in my application I have implmented one genetic method and I am unable to register it to disable Kryo
s
Then its fine. Please make sure if ur kafka cluster can handle ur qps without any cpu throttling
s
I have tried to avoid Kryo by disabling a generic type, But in my application I have implmented one genetic method and I am unable to register it to disable Kryo
Can you share what difficulties you are facing while disabling Kyro
Copy code
env.getConfig().disableGenericTypes();
reference :- https://flink.apache.org/2020/04/15/flink-serialization-tuning-vol.-1-choosing-your-serializer-if-you-can/
k
@Samrat Deb Look on this error, I have one generic function Command it causing a problem
@Samrat Deb Did you get chance to look on it?
t
@Keyur Makwana I'm also facing some performance issue and can't find the right setting so far. Any luck on your side since you posted your message? πŸ‘€
k
@Tiphanie Dousset I have tried to optimize my job by changing serialisation and other part is I am looking for is Table API, It also helped me to give some what high performance
I am not sure it fit your use case, You can check flameGraph there you can see what part of code taking more time