简体   繁体   中英

Why spark executor cores are not equal with active tasks in spark web UI?

I'm using Spark 2.3 thrift server for Ad-hoc Sql queries. My spark parameters are set as below in spark-defaults.conf file:

spark.executor.memory 24G
spark.executor.cores 40
spark.executor.instances 3

However when I checked the spark web ui,the spark cores were not equal with active tasks as the picture blow shows: 在此输入图像描述

How could the active task nums bigger than the cores allocated? Any ideas? Thanks!

I've seen the same thing. I'm not 100% sure, but I believe it is a race condition between the Task threadpool on the executor and the metrics reporting code.

If you click on the thread dump you will see the proper number of threads. However if try it 50 times (with a little luck) you will see an extra task thread is just sitting there in the TIMED_WAITING state.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM