מדדי Spark

במסמך הזה מפורט מידע על מדדי Spark. כברירת מחדל, ‏Serverless for Apache Spark מאפשר איסוף של מדדי Spark זמינים, אלא אם משתמשים במאפייני איסוף מדדי Spark כדי להשבית או לבטל את האיסוף של מדד Spark אחד או יותר.

למידע על מאפיינים נוספים שאפשר להגדיר כששולחים עומס עבודה של אצווה ב-Spark ב-Serverless for Apache Spark, אפשר לעיין במאמר מאפייני Spark.

מאפייני אוסף המדדים של Spark

אפשר להשתמש במאפיינים שמפורטים בקטע הזה כדי להשבית או לבטל את איסוף הנתונים של מדד אחד או יותר מבין המדדים הזמינים של Spark.

מאפיין (property) תיאור
spark.dataproc.driver.metrics הפרמטר הזה משמש להשבתה או לביטול של מדדי מנהל ההתקן של Spark.
spark.dataproc.executor.metrics הפרמטר הזה משמש להשבתה או לביטול של מדדי Spark executor.
spark.dataproc.system.metrics הגדרה להשבתה של מדדי המערכת של Spark.

דוגמאות ל-CLI של gcloud:

  • השבתה של איסוף מדדים של מנהל התקן Spark:

    gcloud dataproc batches submit spark \
        --properties spark.dataproc.driver.metrics="" \
        --region=region \
        other args ...
    
  • החלפת איסוף מדדי ברירת המחדל של מנהל התקנים של Spark כדי לאסוף רק את המדדים BlockManager:disk.diskSpaceUsed_MB ו-DAGScheduler:stage.failedStages:

    gcloud dataproc batches submit spark \
        --properties=^~^spark.dataproc.driver.metrics="BlockManager:disk.diskSpaceUsed_MB,DAGScheduler:stage.failedStages" \
        --region=region \
        other args ...
    

מדדים זמינים של Spark

‫Serverless for Apache Spark אוסף את מדדי Spark שמפורטים בקטע הזה, אלא אם משתמשים במאפיינים של איסוף מדדי Spark כדי להשבית או לבטל את האיסוף שלהם.

custom.googleapis.com/METRIC_EXPLORER_NAME.

מדדים של מנהל התקן Spark

מדד שם הכלי Metrics Explorer
BlockManager:disk.diskSpaceUsed_MB spark/driver/BlockManager/disk/diskSpaceUsed_MB
BlockManager:memory.maxMem_MB spark/driver/BlockManager/memory/maxMem_MB
BlockManager:memory.memUsed_MB spark/driver/BlockManager/memory/memUsed_MB
DAGScheduler:job.activeJobs spark/driver/DAGScheduler/job/activeJobs
DAGScheduler:job.allJobs spark/driver/DAGScheduler/job/allJobs
DAGScheduler:messageProcessingTime spark/driver/DAGScheduler/messageProcessingTime
DAGScheduler:stage.failedStages spark/driver/DAGScheduler/stage/failedStages
DAGScheduler:stage.runningStages spark/driver/DAGScheduler/stage/runningStages
DAGScheduler:stage.waitingStages spark/driver/DAGScheduler/stage/waitingStages

מדדי Spark executor

מדד שם הכלי Metrics Explorer
ExecutorAllocationManager:executors.numberExecutorsDecommissionUnfinished spark/driver/ExecutorAllocationManager/executors/numberExecutorsDecommissionUnfinished
ExecutorAllocationManager:executors.numberExecutorsExitedUnexpectedly spark/driver/ExecutorAllocationManager/executors/numberExecutorsExitedUnexpectedly
ExecutorAllocationManager:executors.numberExecutorsGracefullyDecommissioned spark/driver/ExecutorAllocationManager/executors/numberExecutorsGracefullyDecommissioned
ExecutorAllocationManager:executors.numberExecutorsKilledByDriver spark/driver/ExecutorAllocationManager/executors/numberExecutorsKilledByDriver
LiveListenerBus:queue.executorManagement.listenerProcessingTime spark/driver/LiveListenerBus/queue/executorManagement/listenerProcessingTime
executor:bytesRead spark/executor/bytesRead
executor:bytesWritten spark/executor/bytesWritten
executor:cpuTime spark/executor/cpuTime
executor:diskBytesSpilled spark/executor/diskBytesSpilled
executor:jvmGCTime spark/executor/jvmGCTime
executor:memoryBytesSpilled spark/executor/memoryBytesSpilled
executor:recordsRead spark/executor/recordsRead
executor:recordsWritten spark/executor/recordsWritten
executor:runTime spark/executor/runTime
executor:shuffleFetchWaitTime spark/executor/shuffleFetchWaitTime
executor:shuffleRecordsRead spark/executor/shuffleRecordsRead
executor:shuffleRecordsWritten spark/executor/shuffleRecordsWritten
executor:shuffleRemoteBytesReadToDisk spark/executor/shuffleRemoteBytesReadToDisk
executor:shuffleWriteTime spark/executor/shuffleWriteTime
executor:succeededTasks spark/executor/succeededTasks
ExecutorMetrics:MajorGCTime spark/executor/ExecutorMetrics/MajorGCTime
ExecutorMetrics:MinorGCTime spark/executor/ExecutorMetrics/MinorGCTime

מדדי מערכת

מדד שם ב-Metrics Explorer
agent:uptime agent/uptime
‫cpu:utilization cpu/utilization
disk:bytes_used disk/bytes_used
disk:percent_used disk/percent_used
זיכרון:bytes_used memory/bytes_used
memory:percent_used memory/percent_used
network:tcp_connections network/tcp_connections

הצגת מדדים של Spark

כדי לראות את המדדים של אצווה, לוחצים על מזהה אצווה בדף Batches של Dataproc במסוףGoogle Cloud . כך נפתח הדף Details של האצווה, שבו מוצג תרשים של מדדים לגבי עומס העבודה של האצווה בכרטיסייה Monitoring.

איור 1. תרשים של מדדי Spark לעומס עבודה באצווה.

למידע נוסף על הצגת המדדים שנאספו, אפשר לעיין במאמר בנושא Cloud Monitoring ב-Dataproc.