sindhushree
07/08/2025, 5:33 AMRunLLM
07/08/2025, 5:33 AMpulsar_storage_write_latency metric is less than 5 ms, this indicates that the bottleneck is not in the storage layer (BookKeeper writes), but likely elsewhereβsuch as network delays, broker-side queuing, batching, or client-side issues. The pulsar_storage_write_latency metric specifically measures the time to persist entries to storage, not the total end-to-end publish latency experienced by the producer. High producer latency with low storage latency suggests the delay is before the message reaches storage, possibly due to broker overload, batching settings, or network issues, as described in StreamNative Cloud Metrics and Pulsar Prometheus Stats.
Would you like more detail on how to diagnose or address this discrepancy?
Sources:
- StreamNative Cloud Metrics
- Pulsar Prometheus Stats π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.sindhushree
07/08/2025, 5:37 AMRunLLM
07/08/2025, 5:37 AMpulsar_storage_write_latency is low, follow these steps:
1. Check Broker Load and Queuing: High broker CPU, memory, or thread pool saturation can cause queuing delays before messages are written to storage. Review broker metrics like pulsar_rate_in, pulsar_rate_out, and thread pool usage. If these are high, consider scaling out brokers or tuning thread pools (StreamNative Cloud Metrics).
2. Review Batching and Producer Settings: If batching is enabled, large batchingMaxPublishDelay or high batchingMaxMessages can increase producer-side latency. For latency-sensitive workloads, set batchingMaxPublishDelay to a low value (e.g., 1 ms) or disable batching (Pulsar Perf Docs).
3. Network Latency: Network issues between producer and broker can add significant delay. Check for packet loss, high RTT, or unstable connections.
4. Backpressure and Flow Control: If the broker or topic is throttled (due to publish rate limits or backlog quotas), producers may be blocked. Check for rate limiting metrics and backlog status (StreamNative Cloud Metrics).
5. Client-Side Issues: If the producer is using synchronous sends or has a small maxPendingMessages, it may block waiting for acknowledgments. Increase maxPendingMessages or use async sends for higher throughput (Pulsar Client API).
6. Topic Unload or Failover: If the topic is being unloaded or the broker is failing over, producers may experience temporary unavailability, causing spikes in latency (Pulsar Client Go PR #81).
Example:
If you see high producer latency but pulsar_storage_write_latency_le_5 is high (most writes <5ms), check the broker's CPU and thread pool metrics, reduce batching delay, and ensure the network is healthy.
Would you like a code/config example for tuning producer settings?
Sources:
- StreamNative Cloud Metrics
- Pulsar Perf Docs
- Pulsar Client API
- Pulsar Client Go PR #81 π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.sindhushree
07/08/2025, 5:42 AMRunLLM
07/08/2025, 5:43 AMsindhushree
07/08/2025, 5:46 AMRunLLM
07/08/2025, 5:46 AMpulsar_web_executor_* (such as pulsar_web_executor_max_threads, pulsar_web_executor_active_threads), while Netty IO and orderedExecutor metrics are tracked separately and are not grouped under a shared metric name (Pulsar Metrics Reference, PR #14742).
Would you like a detailed mapping of metric names for each thread pool type?
Sources:
- PR #14742 π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.sindhushree
07/08/2025, 6:01 AMRunLLM
07/08/2025, 6:01 AMepollWait, which is normal for Netty IO threads waiting for network events. High CPU time and long elapsed time are expected for long-lived IO threads; this does not indicate a problem by itself (Pulsar Issue #23187, Pulsar PR #17870).
Would you like more detail on interpreting Netty IO thread states or troubleshooting IO bottlenecks?
Sources:
- Pulsar Issue #23187
- Pulsar PR #17870 π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.sindhushree
07/08/2025, 6:11 AMRunLLM
07/08/2025, 6:11 AMnumIOThreads, numHttpServerThreads, and numOrderedExecutorThreads to better handle concurrent requests (ServiceConfiguration.java).
- Tune broker cache: set maxMessagePublishBufferSizeInMB=500, managedLedgerCacheSizeMB=512, and related cache eviction parameters (Pulsar Issue #23466).
- Monitor and adjust publish rate limits (brokerPublisherThrottlingMaxMessageRate, brokerPublisherThrottlingMaxByteRate) if enabled (TopicPublishThrottlingInitTest.java).
- Ensure network and disk are not bottlenecks, and consider scaling out brokers if resource usage is high.
Would you like a sample configuration or more detail on each parameter?
Sources:
- ServiceConfiguration.java
- Pulsar Issue #23466
- TopicPublishThrottlingInitTest.java π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.sindhushree
07/08/2025, 6:15 AMRunLLM
07/08/2025, 6:15 AMRunLLM
07/08/2025, 6:15 AMsindhushree
07/08/2025, 6:28 AMRunLLM
07/08/2025, 6:28 AMpulsar_broker_publish_latency_count shows the total number of publish operations (7,564,547), and pulsar_broker_publish_latency_sum is the cumulative publish latency in milliseconds (33,593,571 ms) for the cluster "itomdipulsar". To get the average publish latency, divide the sum by the count:
33,593,571 ms / 7,564,547 β 4.44 ms per publish (StreamNative Cloud Metrics).
Would you like help interpreting this further or comparing it to other latency metrics?
Sources:
- StreamNative Cloud Metrics π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.sindhushree
07/08/2025, 6:29 AMsindhushree
07/08/2025, 8:13 AMRunLLM
07/08/2025, 8:13 AMpulsar_lb_memory_usage reports the broker process memory usage as a percentage, used by Pulsar's load balancer to assess broker load. It is labeled by cluster and broker, and helps determine if a broker is overloaded or underutilized (Pulsar Metrics Reference).
Would you like more detail on how this metric is calculated or how to use it for tuning?
Sources:
- Pulsar Metrics Reference π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.sindhushree
07/08/2025, 8:14 AMRunLLM
07/08/2025, 8:14 AMprocess_cpu_seconds_total is a Prometheus counter that reports the total user and system CPU time consumed by the Pulsar process, measured in seconds. It helps monitor overall CPU usage of the broker or function process (StreamNative Cloud Metrics, Pulsar Metrics Reference).
Would you like to know how to interpret this metric or use it for alerting?
Sources:
- StreamNative Cloud Metrics
- Pulsar Metrics Reference π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.sindhushree
07/08/2025, 1:19 PMRunLLM
07/08/2025, 1:19 PMpulsar-admin topics get-publish-rate <topic>
To set the publish rate for a topic, use:
pulsar-admin topics set-publish-rate <topic> --msg-publish-rate <messages/sec> --byte-publish-rate <bytes/sec>
(Pulsar Admin Reference, StreamNative pulsarctl get-publish-rate, StreamNative pulsarctl set-publish-rate)
Would you like examples for namespace-level publish rate commands?
Sources:
- StreamNative pulsarctl get-publish-rate
- StreamNative pulsarctl set-publish-rate π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.sindhushree
07/09/2025, 5:10 AMRunLLM
07/09/2025, 5:10 AMpulsar-admin topics set-publish-rate <topic> --msg-publish-rate -1 --byte-publish-rate -1
(StreamNative pulsarctl set-publish-rate)
Would you like the equivalent command for namespaces or more details?
Sources:
- StreamNative pulsarctl set-publish-rate π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.