מדדי Spark

מדדי Spark מאפשרים לעקוב אחרי הביצועים של עומסי עבודה באצווה ואחרי ניצול המשאבים. התצוגה הזו עוזרת לכם לאבחן צווארי בקבוק בביצועים של מנהלי ההתקנים והמבצעים. כברירת מחדל, Managed Service for Apache Spark אוסף את המדדים הזמינים של Spark, אלא אם משתמשים במאפייני איסוף המדדים של Spark כדי להשבית או לשנות מדדים ספציפיים.

במאמר מאפייני Spark מפורטים מאפיינים נוספים שאפשר להגדיר כששולחים עומס עבודה באצווה ב-Managed Service for Apache 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

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

custom.googleapis.com/METRIC_EXPLORER_NAME.

מדדי Spark driver

מדד שם ב-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

מדדי מערכת

מדד שם ב-Metric Explorer
agent:uptime agent/uptime
cpu:utilization cpu/utilization
disk:bytes_used disk/bytes_used
disk:percent_used disk/percent_used
memory:bytes_used memory/bytes_used
memory:percent_used memory/percent_used
network:tcp_connections network/tcp_connections

הצגת מדדי Spark

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

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

במאמר Cloud Monitoring של Managed Service for Apache Spark מוסבר איך לצפות במדדים שנאספו.