October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Reduce P99 Latency in a High-Traffic Counter Service

A practical process for tracing counter-service p99 latency, diagnosing hot keys and blocking work, and choosing a counter design through representative load testing.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reduce p99 latency by measuring the full request path first, locating whether delay comes from the client, network, datastore, or counter’s write pattern, and then benchmarking a design that fits your traffic and consistency needs. Adding shards may help broad capacity pressure, but it will not automatically split traffic to one hot key. There is no universally correct shard count or guaranteed p99 improvement.

Measure the latency users actually experience

Start with end-to-end request latency and graph p95 and p99, not just averages. Compare client-observed round-trip time with datastore-side command or serving time. Google’s Memorystore client-side metrics guidance recommends tracking client RTT at p95 or p99 and distinguishing it from server execution time.

As an Amazon Associate I earn from qualifying purchases.

  • High client RTT, low server time: Trace the parts of the request outside datastore execution. Check application blocking, serialization, connection handling, and network placement. A cross-region client can see high latency even when Redis command time is low; Google recommends placing the application and Redis instance in the same region and zone for that case.
  • High server execution time: Investigate command complexity, CPU pressure, and whether the datastore has enough capacity for the workload.
  • Both are high: Examine the full trace alongside server metrics; the request may be paying for more than one bottleneck.

Keep the measurements aligned: compare the same request population and time window, and break results down by operation where possible. Otherwise, a fast command mixed with a slow counter path can obscure the source of the tail.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Determine whether the counter write path is serializing

One row or key for every increment

A direct read-modify-write counter is simple and can return an immediately current value. But when many requests update the same row, those writes serialize and can create a hotspot, contention, and higher latency. Index maintenance or a transaction that touches multiple participants can add further write work. Google Cloud’s Cloud Spanner guidance on high-throughput writes describes this trade-off for Spanner; the underlying diagnosis is to check whether concentrated updates are contending on the same counter rather than assuming the database merely needs more general capacity.

#1 Best Overall
Hewlett Packard Enterprise ProLiant MicroServer Gen11 Tower Server with Intel Xeon 6315P, 16GB DDR5, 4LFF Bays, 180W PSU (P86811-005)
  • 2.80 GHz processor speed ensures efficient operation with consistent reliability
  • Intel Xeon 2.80 GHz processor provides enterprise-grade performance with built-in security and remote management capabilities
  • Quad-core (4 Core) processor core helps server process data quickly and reliably for maximum productivity
  • 1 processors supported for faster processing and improved access to data, optimizing performance under heavy loads
  • With 16 GB memory, you can multitask between applications seamlessly, keeping productivity high and response times quick

Several counter rows per logical counter

A sharded counter sends each increment to one of several rows, then sums those rows when a reader asks for the logical total. This spreads writes but makes reads more expensive and can affect how current the aggregate appears. The Cloud Spanner article gives 10–100 rows as an example range based on expected throughput and explicitly calls for load testing to choose a value. Treat that range as Spanner-specific guidance, not a default for other databases or a universal shard-count recommendation.

Blind writes with periodic aggregation

For very high write rates, the same Spanner article describes blind writes followed by periodic aggregation, identifying approximately 100K QPS per key as the intended scale for that particular approach. This is not a measured guarantee or a general throughput promise. It changes freshness and aggregation behavior, so use it only when the application can tolerate those semantics and a representative benchmark shows that simpler designs are insufficient.

Rank #2
Dell Optiplex 7050 SFF Desktop PC Intel i7-7700 4-Cores 3.60GHz 32GB DDR4 1TB SSD WiFi BT HDMI Duel Monitor Support Windows 11 Pro Excellent Condition(Renewed)
  • Model: Dell OptiPlex 7050 Small Form Factor (SFF)
  • Processor: Intel Core i7-7700 3.60 GHz
  • Memory: 32GB DDR4 Ram
  • Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
  • Operating System: Windows 11 Pro (64-bit)

Find hot keys or hot ranges before adding capacity

Redis hot keys

Redis Software documentation defines a hot key as one accessed very frequently and gives thousands of operations per second as an example. Because a key maps to one shard, its requests can drive that shard’s CPU and affect unrelated operations on it. Adding general shards may address broad under-provisioning, but does not by itself distribute one key’s traffic. See Redis observability and monitoring guidance for hot-key and shard monitoring.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the hot-key traffic is read-only, an application-local cache may reduce datastore requests when its freshness behavior is acceptable. Redis documentation’s five-second expiry is an example, not a prescribed setting. Do not cache a value as though it were current if the application requires every read to reflect the latest increment.

Rank #3
Dell PowerEdge R730xd Server 24B SFF 2U, 2X Intel Xeon E5-2690 v4 2.6Ghz (28-cores Total), 128GB DDR4 RAM, 4X 1.2TB 10K SAS 2.5” 12Gb/s HDD, H730P 2GB RAID, NIC 10Gb + I350 1Gb (Renewed)
  • Dell PowerEdge R730xd 24B SFF 2U Server
  • 2x Intel Xeon E5-2690 v4 2.6Ghz 14-Core (28-cores Total)
  • 128GB DDR4 RAM – 4x 1.2TB 10K SAS 2.5” 12Gb/s
  • Dell H730P mini 2GB 12Gb/s RAID
  • 2x 750W PSU - 2x 10Gb SFP+ 2x 1Gb (RJ45) NIC

Partitioned databases and hot ranges

For a partitioned datastore, determine whether load is concentrated in a narrow key range, tablet, or partition. Bigtable’s latency troubleshooting guidance recommends checking the hottest-node CPU graph and using hot-tablet or Key Visualizer diagnostics. It notes that remediation may require changing row-key construction or schema, not merely adding nodes. This is a useful diagnostic analogy; it does not mean every counter service uses Bigtable.

Remove command-path blockers and inefficient work

A slow or blocking operation can delay unrelated requests that queue behind it. Inspect slow logs and command duration, and correlate spikes with shard CPU, throughput, network ingress and egress, and request rate. Redis documents simple O(1) operations such as GET and SET as efficient, while large O(N) operations can consume CPU as data structures grow. Memorystore explains that an O(N) command can pause the engine and queue other requests.

Rank #4
HPE Hewlett Packard Enterprise ProLiant MicroServer Gen11 Tower Server, Intel Pentium Gold G7400 Processor, 16GB Memory, 1TB HDD Storage, External 180W US Power Supply Smart Choice P74439-005
  • MODEL P74439-005: Compact and affordable HPE ProLiant MicroServer Gen11 powered by Intel Pentium Gold G7400 3.7GHz processor, ideal for file sharing, NAS, and basic business workloads
  • READY OUT OF THE BOX: Includes 16GB DDR5 UDIMM memory (expandable to 128GB), one 1TB SATA 6G Business Critical HDD, embedded Intel VROC SATA, dedicated iLO-M.2 port kit, 180w external power adapter and 1/1/1 warranty for dependable plug-and-play server operation
  • WHISPER-QUIET & SPACE-SAVING: Ultra-compact mini tower design fits easily in small office spaces; supports wall, flat, or vertical placement for deployment flexibility
  • INTEGRATED REMOTE MANAGEMENT: Comes with HPE iLO 6 and embedded TPM 2.0 for secure, license-free remote server administration through shared port access
  • EXPANDABLE DESIGN: Two PCIe slots (including PCIe 5.0) and four LFF-NHP drive bays provide robust options for storage and component scalability. Features new MR408i-p controller support for enhanced storage performance
  • Avoid production-wide KEYS scans; use the SCAN family for incremental traversal.
  • Check whether the counter path performs unnecessary reads, large collection operations, or additional writes such as index updates.
  • If simple commands remain slow under broad load after inefficient operations are ruled out, consider whether more shards or nodes are needed.

Capacity changes address broad load; they are not a substitute for redesigning a single concentrated hot key. Use the Memorystore latency guidance and Redis observability guidance to connect command behavior to the observed latency.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Include consistency and placement in the design

Counter optimizations change what a reader sees and when. Strongly consistent reads and distributed commits can require coordination and network round trips. The Google SRE Book’s discussion of managing critical state explains that a strong read may require quorum communication or a leader that has seen recent writes, and that network RTT and persistent-storage writes impose physical costs.

Best Value
Sale
KAMRUI Pinova P2 Mini PC 16GB RAM 512GB SSD, AMD Ryzen 4300U(Beats 5400U/3500U/N95,Up to 3.7GHz,4C/8T) Mini Computers,Triple 4K Display/HDMI+DP+Type-C/WiFi/BT for Home/Business Mini Desktop Computers
  • 【AMD Ryzen 4300U True 4-Core CPU: Outperforms N95 & i3-10110U】KAMRUI P2 Mini PC is equipped with true 4-core AMD Ryzen 4300U processor built on advanced 7nm Zen2 architecture,This means you get consistent, unthrottled performance for hours on end, whether you’re running multiple browser tabs, streaming 4K content, or managing virtual machines. Compare that to Intel N95 (4 efficiency cores that throttle under load) or Intel i3-10110U (only 2 cores total), and the difference is night and day: The KAMRUI P2 AMD Ryzen 4300U (28W) is 40% faster than the Intel i3-10110U and 25% faster than the Intel N95 in multi-core tasks, ensuring smooth, lag-free performance even during heavy workloads.
  • 【Integrated AMD Radeon Graphics: 2.5X Stronger for Tri 4K】The KAMRUI P2 AMD 4300U Mini PC have unlocked the full potential of the built-in AMD Radeon Vega 5 graphics with 28W power delivery, making it 2.5 times stronger than the Intel UHD graphics found in the N95 and i3-10110U. This means you can enjoy Tri 4K@60Hz displays without a single stutter, perfect for productivity setups, home theaters, or even light photo/video editing and casual gaming. While the Intel N95/i3-10110U struggle to run a single 4K display without lag, The KAMRUI AMD 4300U Mini PC handles Tri 4K effortlessly, turning your workspace into a high-efficiency hub or your living room into a premium entertainment center.
  • 【Large Storage Capacity, Easy Expansion】KAMRUI Pinova P2 mini computers is equipped with 16GB LPDDR4 for faster multitasking and smooth application switching. 512GB M.2 SSD ensures fast startup, fast file transfers and plenty of storage space,eliminating slow loading times and ensuring fast responsiveness. the two storage slots (1x M.2 2280 SATA/NVMe PCIe3.0 slot, 1x M.2 2280 SATA slot) can be combined to provide up to 4TB of total storage(Not included). This gives you enough space for all your projects, media and data.
  • 【4K Triple Display】KAMRUI Pinova P2 4300U mini desktop computers is equipped with HDMI2.0 ×1 +DP1.4 ×1+USB3.2 Gen2 Type-C ×1 interfaces for faster transmission, Triple 4K@60Hz Display, KAMRUI P2 mini computer is ideal for visual home entertainment, home office, conference rooms, etc. USB3.2 Gen2 Type-A port ×2 with a transfer speed of up to 10 Gbps (21 times faster than USB 2.0) for efficient data transfer. Ideal for seamless multitasking between spreadsheets, browsers and presentations, or for an immersive entertainment experience.
  • 【USB3.2 Gen2 Type-C 10Gbps, Versatile connectivity】KAMRUI P2 mini desktop pc fast and versatile connectivity! The USB3.2 Gen2 Type-C port offers a data transfer rate of 10Gbps and simultaneously supports DisplayPort 1.4 video output. The P2 AMD Ryzen 4300U Mini PC is complemented by Gigabit LAN, WiFi and Bluetooth, so nothing stands in the way of a productive working environment.

Before adopting sharded writes, stale reads, local caching, or periodic aggregation, define the correctness behavior the service needs: whether reads must include every acknowledged increment, how retries avoid double counting, and what readers may observe during failures or aggregation delays. Place application and datastore components with network distance in mind, then measure the result from the client’s perspective.

Benchmark candidates against the actual workload

Do not choose a counter design from a shard-count rule of thumb. Test candidates at representative traffic rates and key distributions, including the concentration that creates the hotspot. Compare:

  • p99 and p95 end-to-end latency at expected load, alongside server command or serving time;
  • write throughput, read cost, aggregation overhead, and value freshness;
  • consistency and correctness under retries or failures;
  • lock contention, transaction aborts, and extra index or multi-row work;
  • network placement and its effect on client RTT;
  • operational complexity, observability, and recovery behavior.

For a Spanner sharded counter, the source guidance specifically recommends load testing at fixed throughput to select an appropriate row count. Apply the same discipline to other candidate designs, using the service’s real read/write mix and requirements rather than carrying Spanner’s example range over to another system. Keep an unchanged baseline so you can tell whether a design actually improves the tail under the same conditions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.