### What changes were proposed in this pull request? Move Rest API out from monitoring.md to webapi.md ### Why are the changes needed? To close CELEBORN-1436 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Review https://github.com/turboFei/incubator-celeborn/blob/webapi_md/docs/webapi.md Closes #2624 from turboFei/webapi_md. Lead-authored-by: Wang, Fei <fwang12@ebay.com> Co-authored-by: Cheng Pan <pan3793@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
14 KiB
| license |
|---|
| Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
Monitoring
There are two ways to monitor Celeborn cluster: Prometheus metrics and REST API.
Metrics
Celeborn has a configurable metrics system based on the
Dropwizard Metrics Library.
This allows users to report Celeborn metrics to a variety of sinks including HTTP, JMX, CSV
files and prometheus servlet. The metrics are generated by sources embedded in the Celeborn code base.
They provide instrumentation for specific activities and Celeborn components.
The metrics system is configured via a configuration file that Celeborn expects to be present
at $CELEBORN_HOME/conf/metrics.properties. A custom file location can be specified via the
celeborn.metrics.conf configuration property.
Instead of using the configuration file, a set of configuration parameters with prefix
celeborn.metrics.conf. can be used.
Celeborn's metrics are divided into two instances corresponding to Celeborn components. The following instances are currently supported:
master: The Celeborn cluster master process.worker: The Celeborn cluster worker process.
Each instance can report to zero or more sinks. Sinks are contained in the
org.apache.celeborn.common.metrics.sink package:
CSVSink: Exports metrics data to CSV files at regular intervals.PrometheusServlet: Adds a servlet within the existing Celeborn REST API to serve metrics data in Prometheus format.GraphiteSink: Sends metrics to a Graphite node.
The syntax of the metrics configuration file and the parameters available for each sink are defined
in an example configuration file,
$CELEBORN_HOME/conf/metrics.properties.template.
When using Celeborn configuration parameters instead of the metrics configuration file, the relevant
parameter names are composed by the prefix celeborn.metrics.conf. followed by the configuration
details, i.e. the parameters take the following form:
celeborn.metrics.conf.[instance|*].sink.[sink_name].[parameter_name].
This example shows a list of Celeborn configuration parameters for a CSV sink:
"celeborn.metrics.conf.*.sink.csv.class"="org.apache.celeborn.common.metrics.sink.CsvSink"
"celeborn.metrics.conf.*.sink.csv.period"="1"
"celeborn.metrics.conf.*.sink.csv.unit"=minutes
"celeborn.metrics.conf.*.sink.csv.directory"=/tmp/
Default values of the Celeborn metrics configuration are as follows:
*.sink.prometheusServlet.class=org.apache.celeborn.common.metrics.sink.PrometheusServlet
Additional sources can be configured using the metrics configuration file or the configuration
parameter celeborn.metrics.conf.[component_name].source.jvm.class=[source_name]. At present the
no source is the available optional source. For example the following configuration parameter
activates the Example source:
"celeborn.metrics.conf.*.source.jvm.class"="org.apache.celeborn.common.metrics.source.ExampleSource"
Available metrics providers
Metrics used by Celeborn are of multiple types: gauge, counter, histogram, meter and timer,
see Dropwizard library documentation for details.
The following list of components and metrics reports the name and some details about the available metrics,
grouped per component instance and source namespace.
The most common time of metrics used in Celeborn instrumentation are gauges and counters.
Counters can be recognized as they have the .count suffix. Timers, meters and histograms are annotated
in the list, the rest of the list elements are metrics of type gauge.
The large majority of metrics are active as soon as their parent component instance is configured,
some metrics require also to be enabled via an additional configuration parameter, the details are
reported in the list.
Master
These metrics are exposed by Celeborn master.
-
namespace=master
- RegisteredShuffleCount
- DeviceCelebornFreeBytes
- DeviceCelebornTotalBytes
- RunningApplicationCount
- ActiveShuffleSize
- The active shuffle size of workers.
- ActiveShuffleFileCount
- The active shuffle file count of workers.
- WorkerCount
- LostWorkerCount
- ExcludedWorkerCount
- ShutdownWorkerCount
- DecommissionWorkerCount
- IsActiveMaster
- PartitionSize
- The size of estimated shuffle partition.
- OfferSlotsTime
- The time for masters to handle
RequestSlotsrequest when registering shuffle.
- The time for masters to handle
-
namespace=CPU
- JVMCPUTime
-
namespace=system
- LastMinuteSystemLoad
- The average system load for the last minute.
- AvailableProcessors
- LastMinuteSystemLoad
-
namespace=JVM
- This source provides information on JVM metrics using the Dropwizard/Codahale Metric Sets for JVM instrumentation and in particular the metric sets BufferPoolMetricSet, GarbageCollectorMetricSet and MemoryUsageGaugeSet.
-
namespace=ResourceConsumption
- notes:
- This metrics data is generated for each user and they are identified using a metric tag.
- This metrics also include subResourceConsumptions generated for each application of user and they are identified using
applicationIdtag.
- diskFileCount
- diskBytesWritten
- hdfsFileCount
- hdfsBytesWritten
- notes:
-
namespace=ThreadPool
- notes:
- This metrics data is generated for each thread pool and they are identified using a metric tag by thread pool name.
- active_thread_count
- pending_task_count
- pool_size
- core_pool_size
- maximum_pool_size
- largest_pool_size
- is_terminating
- is_terminated
- is_shutdown
- thread_count
- thread_is_terminated_count
- thread_is_shutdown_count
- notes:
Worker
These metrics are exposed by Celeborn worker.
-
namespace=worker
- RegisteredShuffleCount
- RunningApplicationCount
- ActiveShuffleSize
- The active shuffle size of a worker including master replica and slave replica.
- ActiveShuffleFileCount
- The active shuffle file count of a worker including master replica and slave replica.
- OpenStreamTime
- The time for a worker to process openStream RPC and return StreamHandle.
- FetchChunkTime
- The time for a worker to fetch a chunk which is 8MB by default from a reduced partition.
- ActiveChunkStreamCount
- Active stream count for reduce partition reading streams.
- OpenStreamSuccessCount
- OpenStreamFailCount
- FetchChunkSuccessCount
- FetchChunkFailCount
- PrimaryPushDataTime
- The time for a worker to handle a pushData RPC sent from a celeborn client.
- ReplicaPushDataTime
- The time for a worker to handle a pushData RPC sent from a celeborn worker by replicating.
- WriteDataHardSplitCount
- WriteDataSuccessCount
- WriteDataFailCount
- ReplicateDataFailCount
- ReplicateDataWriteFailCount
- ReplicateDataCreateConnectionFailCount
- ReplicateDataConnectionExceptionCount
- ReplicateDataFailNonCriticalCauseCount
- ReplicateDataTimeoutCount
- PushDataHandshakeFailCount
- RegionStartFailCount
- RegionFinishFailCount
- PrimaryPushDataHandshakeTime
- ReplicaPushDataHandshakeTime
- PrimaryRegionStartTime
- ReplicaRegionStartTime
- PrimaryRegionFinishTime
- ReplicaRegionFinishTime
- PausePushDataTime
- The time for a worker to stop receiving pushData from clients because of back pressure.
- PausePushDataAndReplicateTime
- The time for a worker to stop receiving pushData from clients and other workers because of back pressure.
- PausePushData
- The count for a worker to stop receiving pushData from clients because of back pressure.
- PausePushDataAndReplicate
- The count for a worker to stop receiving pushData from clients and other workers because of back pressure.
- TakeBufferTime
- The time for a worker to take out a buffer from a disk flusher.
- FlushDataTime
- The time for a worker to write a buffer which is 256KB by default to storage.
- CommitFilesTime
- The time for a worker to flush buffers and close files related to specified shuffle.
- SlotsAllocated
- ActiveSlotsCount
- The number of slots currently being used in a worker
- ReserveSlotsTime
- ActiveConnectionCount
- NettyMemory
- The total amount of off-heap memory used by celeborn worker.
- SortTime
- The time for a worker to sort a shuffle file.
- SortMemory
- The memory used by sorting shuffle files.
- SortingFiles
- SortedFiles
- SortedFileSize
- DiskBuffer
- The memory occupied by pushData and pushMergedData which should be written to disk.
- BufferStreamReadBuffer
- The memory used by credit stream read buffer.
- ReadBufferDispatcherRequestsLength
- The queue size of read buffer allocation requests.
- ReadBufferAllocatedCount
- Allocated read buffer count.
- ActiveCreditStreamCount
- Active stream count for map partition reading streams.
- ActiveMapPartitionCount
- CleanTaskQueueSize
- CleanExpiredShuffleKeysTime
- The time for a worker to clean up shuffle data of expired shuffle keys.
- DeviceOSFreeBytes
- DeviceOSTotalBytes
- DeviceCelebornFreeBytes
- DeviceCelebornTotalBytes
- PotentialConsumeSpeed
- UserProduceSpeed
- WorkerConsumeSpeed
- IsDecommissioningWorker
- push_server_usedHeapMemory
- push_server_usedDirectMemory
- push_server_numAllocations
- push_server_numTinyAllocations
- push_server_numSmallAllocations
- push_server_numNormalAllocations
- push_server_numHugeAllocations
- push_server_numDeallocations
- push_server_numTinyDeallocations
- push_server_numSmallDeallocations
- push_server_numNormalDeallocations
- push_server_numHugeDeallocations
- push_server_numActiveAllocations
- push_server_numActiveTinyAllocations
- push_server_numActiveSmallAllocations
- push_server_numActiveNormalAllocations
- push_server_numActiveHugeAllocations
- push_server_numActiveBytes
- replicate_server_usedHeapMemory
- replicate_server_usedDirectMemory
- replicate_server_numAllocations
- replicate_server_numTinyAllocations
- replicate_server_numSmallAllocations
- replicate_server_numNormalAllocations
- replicate_server_numHugeAllocations
- replicate_server_numDeallocations
- replicate_server_numTinyDeallocations
- replicate_server_numSmallDeallocations
- replicate_server_numNormalDeallocations
- replicate_server_numHugeDeallocations
- replicate_server_numActiveAllocations
- replicate_server_numActiveTinyAllocations
- replicate_server_numActiveSmallAllocations
- replicate_server_numActiveNormalAllocations
- replicate_server_numActiveHugeAllocations
- replicate_server_numActiveBytes
- fetch_server_usedHeapMemory
- fetch_server_usedDirectMemory
- fetch_server_numAllocations
- fetch_server_numTinyAllocations
- fetch_server_numSmallAllocations
- fetch_server_numNormalAllocations
- fetch_server_numHugeAllocations
- fetch_server_numDeallocations
- fetch_server_numTinyDeallocations
- fetch_server_numSmallDeallocations
- fetch_server_numNormalDeallocations
- fetch_server_numHugeDeallocations
- fetch_server_numActiveAllocations
- fetch_server_numActiveTinyAllocations
- fetch_server_numActiveSmallAllocations
- fetch_server_numActiveNormalAllocations
- fetch_server_numActiveHugeAllocations
- fetch_server_numActiveBytes
-
namespace=CPU
- JVMCPUTime
-
namespace=system
- LastMinuteSystemLoad
- Returns the system load average for the last minute.
- AvailableProcessors
- LastMinuteSystemLoad
-
namespace=JVM
- This source provides information on JVM metrics using the Dropwizard/Codahale Metric Sets for JVM instrumentation and in particular the metric sets BufferPoolMetricSet, GarbageCollectorMetricSet and MemoryUsageGaugeSet.
-
namespace=ResourceConsumption
- notes:
- This metrics data is generated for each user and they are identified using a metric tag.
- This metrics also include subResourceConsumptions generated for each application of user and they are identified using
applicationIdtag.
- diskFileCount
- diskBytesWritten
- hdfsFileCount
- hdfsBytesWritten
- notes:
-
namespace=ThreadPool
- notes:
- This metrics data is generated for each thread pool and they are identified using a metric tag by thread pool name.
- active_thread_count
- pending_task_count
- pool_size
- core_pool_size
- maximum_pool_size
- largest_pool_size
- is_terminating
- is_terminated
- is_shutdown
- notes:
Note:
The Netty DirectArenaMetrics named like push/fetch/replicate_server_numXX are not exposed by default, nor in Grafana dashboard.
If there is a need, you can enable celeborn.network.memory.allocator.verbose.metric to expose these metrics.
REST API
In addition to viewing the metrics, Celeborn also supports REST API. This gives developers an easy way to create new visualizations and monitoring tools for Celeborn and also easy for users to get the running status of the service.