Technical September 4, 2026 7 min read

Browser Mining CPU Throttling Guide: Balancing UX and Hashrate

Master CPU throttling for browser mining: boost hashrate without killing user experience. Earnify's data-driven guide for publishers.

Browser-based crypto mining is a powerful monetization tool for publishers, but it walks a fine line. Push CPU usage too high, and visitors bounce. Throttle too aggressively, and revenue evaporates. This guide breaks down the art and science of CPU throttling in browser mining, using real benchmarks from Earnify's MinotaurX implementation to help you find the sweet spot.

Why Throttling Matters

Every millisecond of CPU time you consume from a visitor has a cost. According to Earnify's 2025 publisher survey, sites that mine at full CPU capacity without throttling see a 42% higher bounce rate and a 28% drop in average session duration. On the flip side, overly conservative throttling can reduce mining revenue by up to 65%.

Key Stat: Earnify's data shows that a 20% reduction in CPU usage results in only an 8% drop in hashrate on MinotaurX, thanks to efficient WebAssembly scheduling.

Throttling isn't just about politeness—it's about sustainable revenue. A visitor who leaves after 30 seconds generates almost nothing. A visitor who stays for 5 minutes with moderate CPU load generates consistent income.

How Browser Mining CPU Usage Works

Browser mining runs JavaScript in Web Workers, which execute on separate threads from the UI. This prevents page freezes, but the CPU is still shared. Earnify's zero-server architecture uses WebAssembly (WASM) compiled mining kernels, achieving approximately 70% of native CPU speed. That efficiency means you can often throttle less aggressively while still maintaining good UX.

Thread Allocation and Core Reservation

Earnify reserves n-1 CPU cores for mining, leaving one core for the browser's UI thread and other tasks. On a quad-core laptop, that means 3 cores mine while 1 handles rendering. This built-in reservation already provides a baseline throttle. But you can go further by limiting the number of threads or adjusting the intensity per thread.

┌─────────────────────────────────────────┐
│  Browser Tab                            │
│  ┌─────────────┐   ┌─────────────────┐  │
│  │ UI Thread   │   │ Web Worker 1    │  │
│  │ (Core 0)    │   │ (Core 1)        │  │
│  │             │   │  Mining WASM    │  │
│  └─────────────┘   └─────────────────┘  │
│  ┌─────────────┐   ┌─────────────────┐  │
│  │ Web Worker 2│   │ Web Worker 3    │  │
│  │ (Core 2)    │   │ (Core 3)        │  │
│  │  Mining WASM│   │  Mining WASM    │  │
│  └─────────────┘   └─────────────────┘  │
└─────────────────────────────────────────┘

The Role of WebAssembly

WebAssembly compiles mining algorithms to near-native machine code. This is why browser mining can achieve 70% of native performance. But it also means CPU spikes can be sharp. Throttling via setTimeout or requestAnimationFrame in the worker loop smooths these spikes. Earnify's scheduler uses a dynamic duty cycle: mine for X milliseconds, sleep for Y milliseconds, adjust based on target CPU usage.

Throttling Strategies and Configuration

There are three primary throttling methods in browser mining: thread count limiting, duty cycle adjustment, and dynamic load detection. Earnify supports all three through its single script tag configuration.

Method 1: Thread Count Limiting

The simplest approach: tell the miner to use fewer threads. On a 4-core machine, using 2 threads instead of 3 reduces CPU usage by roughly 33% and hashrate by about 25% (due to overhead). This is ideal for low-end devices or when you want a predictable cap.

Threads UsedCPU Usage (4-core)Relative HashrateUX Impact
125%35%Minimal
250%65%Low
375%90%Moderate
4100%100%High

Data from Earnify's 2026 MinotaurX benchmarks on a mid-range Intel i5-1135G7.

Method 2: Duty Cycle Adjustment

Instead of reducing threads, you can reduce the percentage of time each thread actively mines. A 50% duty cycle means the miner runs for 50ms, then sleeps for 50ms. This yields finer control and smoother CPU graphs.

// Earnify configuration: 50% duty cycle
const earnifyConfig = {
  'threads': 3,
  'throttle': 0.5, // 50% duty cycle
  'pool': 'stratum+tcp://pool.earnify.cc:3333',
  'wallet': 'YOUR_DOGECOIN_ADDRESS'
};
earnify.start(earnifyConfig);

Duty cycle throttling is more efficient than thread limiting because it avoids thread context switching overhead. Earnify's benchmarks show a 50% duty cycle on 3 threads yields 52% of full hashrate while consuming only 38% of CPU time.

Method 3: Dynamic Load Detection

The most advanced approach: monitor the user's activity and adjust mining intensity in real time. If the user is scrolling or typing, reduce throttle to 20%. If the tab is idle for 30 seconds, increase to 80%. Earnify's autoThrottle option implements this using the Page Visibility API and input event listeners.

Best Practice: Combine dynamic load detection with a hard cap (e.g., never exceed 70% CPU). This prevents runaway mining on low-end devices while maximizing revenue during idle periods.

Benchmarking Your Throttle Settings

You can't optimize what you don't measure. Earnify's dashboard provides real-time hashrate and CPU usage metrics per session. But for A/B testing throttle configurations, use the following methodology:

  1. Create three test groups: aggressive throttle (30% CPU cap), moderate (50%), and light (70%).
  2. Run each for at least 1,000 sessions to get statistical significance.
  3. Measure bounce rate, session duration, pages per session, and hashrate per session.
  4. Calculate revenue per session (hashrate × session duration × coin price).

According to Earnify's 2026 publisher case study, a news site with 200k monthly visitors found that a 50% CPU cap generated 12% more revenue per session than a 70% cap, despite lower hashrate, because session duration increased by 34%.

30% cap50% cap70% cap100% capRevenue per session (relative)

Relative revenue per session at different CPU caps. Data from Earnify's 2026 publisher A/B test.

Implementing Throttling with Earnify

Earnify's single script tag deployment includes built-in throttling controls. Here's a complete configuration that balances UX and hashrate:

<!-- Earnify mining script with dynamic throttling -->
<script src="https://cdn.earnify.cc/miner.js" async></script>
<script>
  const earnifyConfig = {
    'threads': 2,
    'throttle': 0.6, // 60% duty cycle
    'autoThrottle': true,
    'maxCpu': 0.7, // hard cap at 70% CPU
    'idleBoost': 0.9, // 90% throttle when tab is idle
    'pool': 'stratum+tcp://pool.earnify.cc:3333',
    'wallet': 'YOUR_DOGECOIN_ADDRESS'
  };
  earnify.start(earnifyConfig);
</script>

This configuration uses 2 threads, a 60% base duty cycle, and automatic throttling that boosts to 90% when the tab is idle and caps at 70% CPU during active use. According to Earnify's 2026 benchmarks, this setup on a desktop visitor with MinotaurX averages 1,870 H/s while maintaining a smooth browsing experience.

For more configuration options, see the Earnify Configuration Guide.

FAQs

What is the ideal CPU throttle percentage for browser mining?

The ideal throttle depends on your audience and content type. For content-heavy sites where users read long articles, a 50-60% CPU cap works well. For interactive web apps, keep it under 40%. Earnify's data shows that a 50% cap maximizes revenue per session for most publishers.

Does throttling reduce mining profitability?

Yes, but not linearly. A 20% reduction in CPU usage typically results in only an 8-10% hashrate drop due to WebAssembly efficiency. More importantly, throttling increases session duration and reduces bounce rate, often leading to higher total revenue per visitor.

Can I throttle mining on mobile devices?

Earnify's miner automatically detects mobile devices and reduces thread count to 1 with a 30% duty cycle. Mobile CPUs are less efficient for mining and more sensitive to heat and battery drain, so aggressive throttling is essential. On mobile, expect about 15-20% of desktop hashrate.

Ready to implement smart throttling on your site? Start mining with Earnify today — it takes one line of code, and you keep 90% of the revenue.

Frequently Asked Questions

What is the ideal CPU throttle percentage for browser mining?

The ideal throttle depends on your audience and content type. For content-heavy sites where users read long articles, a 50-60% CPU cap works well. For interactive web apps, keep it under 40%. Earnify's data shows that a 50% cap maximizes revenue per session for most publishers.

Does throttling reduce mining profitability?

Yes, but not linearly. A 20% reduction in CPU usage typically results in only an 8-10% hashrate drop due to WebAssembly efficiency. More importantly, throttling increases session duration and reduces bounce rate, often leading to higher total revenue per visitor.

Can I throttle mining on mobile devices?

Earnify's miner automatically detects mobile devices and reduces thread count to 1 with a 30% duty cycle. Mobile CPUs are less efficient for mining and more sensitive to heat and battery drain, so aggressive throttling is essential. On mobile, expect about 15-20% of desktop hashrate.

Deploy Browser Mining in 5 Minutes

Workers, WASM, and Stratum — wired up and ready. Single script tag, open source, 10% fee.

Get Started with Earnify