Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Drop specific SQL plan baseline – spm Oracle
  • Space padding in korn shell Linux/Unix
  • All About oracle password and security from metalink Oracle
  • For Perl DBI installation and testing program PHP/MYSQL/Wordpress
  • Explain Plan Doesn’T Change For Sql After New Statistics Generated Oracle
  • Specify the Rollback segment to use in Transaction Oracle
  • Session_info.ksh Linux/Unix
  • USER_TABLES.Freelists Oracle
  • Oracle vs MYSQL Architecture differences (For DBAs) MYSQL
  • DBMS_SQL for alter session. Oracle
  • To check whether standby is recovering properly or not?? Oracle
  • Removing Ctrl-M from end of line using vi Linux/Unix
  • For Search and replace unix command. Linux/Unix
  • Goldengate Tutorial Oracle
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle

CPU Core related projections

Posted on 12-Mar-202512-Mar-2025 By Admin No Comments on CPU Core related projections

Rule of Thumb for Estimating Concurrent DB Connections on a 24-Core Machine (Single Thread Each)

The number of concurrent database connections a 24-core machine can handle depends on various factors, including:

  1. CPU-bound vs. I/O-bound workload:
    • If queries are CPU-intensive, fewer connections can be supported.
    • If queries are I/O-heavy (waiting for disk/network), more connections can be supported.
  2. Database Engine and Configuration:
    • Oracle, PostgreSQL, MySQL, etc., handle concurrency differently.
    • Connection pooling and caching can impact the actual limit.
  3. Operating System and Memory Availability:
    • Context switching overhead increases with more connections.
    • Sufficient RAM is needed to avoid excessive swapping.

Hypothetical Calculation Based on CPU

A single-threaded, single-core system can typically handle 2-10 concurrent active queries (depending on execution time and parallelism). For a 24-core machine, we estimate:

1. If CPU is the Primary Bottleneck (CPU-Bound Workloads)

  • A general rule of thumb is 10 active connections per core.
  • For 24 cores: 24×10=240 active queries24 \times 10 = 240 \text{ active queries}
  • Beyond this, performance degrades due to CPU contention.

2. If the Workload is I/O-Bound (Queries Waiting for I/O)

  • More connections can be supported because many queries wait for disk or network.
  • Rule of thumb: 50-100 connections per core.
  • For 24 cores: 24×50=1,200 connections (moderate load)24 \times 50 = 1,200 \text{ connections (moderate load)} 24×100=2,400 connections (light workload)24 \times 100 = 2,400 \text{ connections (light workload)}

3. If Connection Pooling is Used

  • With a connection pool, inactive connections reuse the same thread, reducing load.
  • Typical connection pooling ratios:
    • 4-5x the number of cores for CPU-heavy loads → 96-120 connections.
    • 10-20x the number of cores for I/O-heavy loads → 240-480 connections.

Practical Estimation (Hypothetical)

Workload TypePer Core Estimate24-Core Estimate
CPU-Bound Queries~10 active queries~240 active connections
I/O-Bound Queries~50-100 connections~1,200 – 2,400 connections
With Connection Pooling~4-20x cores~96 – 480 connections

Conclusion

  1. For CPU-heavy applications → ~240 active connections.
  2. For mixed workloads (balanced CPU & I/O) → ~1,200 connections.
  3. For I/O-heavy workloads (many idle/waiting queries) → ~2,400 connections.
  4. With connection pooling → Effective limit increases (~480 connections).

Best Practices

  • Use connection pooling (pgbouncer for PostgreSQL, Oracle DRCP, HikariCP for Java).
  • Optimize queries to reduce long-running transactions.
  • Monitor CPU and wait states (top, vmstat, iostat in Linux).
  • Tune database parameters like PROCESSES (Oracle), max_connections (PostgreSQL), or thread_cache_size (MySQL).

Let me know if you need database-specific recommendations! 🚀

AWS, Azure, Linux/Unix, Oracle

Post navigation

Previous Post: Exadata Basics
Next Post: JSON/XML Types in Oracle

Related Posts

  • How to start CRS manually Oracle
  • Good Site for Oracle Internals Oracle
  • create a folder in multiple places Linux/Unix
  • Jai Shree Ram Linux/Unix
  • Sending SQLPLUS output in HTML format Oracle
  • chk_space_SID.ksh Linux/Unix

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • cur_sql.sql Oracle
  • Pending Distributed Transations Oracle
  • tab.sql Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • cif crons Linux/Unix
  • shr1.sql for MTS or Shared server configuration Oracle
  • Nice Article about semaphores and init.ora Processes parameter relations Linux/Unix
  • For Search and replace unix command. Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme