@@ -2680,8 +2680,8 @@ oracledb.getConnection(
2680
2680
2681
2681
### <a name="numberofthreads"></a> 8.2 Connections and Number of Threads
2682
2682
2683
- If you use a large number of connections, such as via increasing
2684
- [` poolMax` ](#proppoolpoolmax), you may want to also increase the
2683
+ If you open more than four connections, such as via
2684
+ increasing [` poolMax` ](#proppoolpoolmax), you should increase the
2685
2685
number of threads available to node-oracledb.
2686
2686
2687
2687
Node.js worker threads executing database statements on a connection will
@@ -2703,6 +2703,14 @@ can be increased to 10 by using the following command:
2703
2703
$ UV_THREADPOOL_SIZE = 10 node myapp .js
2704
2704
` ` `
2705
2705
2706
+ The thread pool size should be at least equal to the maxiumum number
2707
+ of connections. If the application does database and non-database
2708
+ work concurrently, extra threads could also be required for optimal
2709
+ throughput.
2710
+
2711
+ Note the '[libuv](https://github.com/libuv/libuv)' library used by
2712
+ Node.js limits the number of threads to 128.
2713
+
2706
2714
### <a name="connpooling"></a> 8.3 Connection Pooling
2707
2715
2708
2716
When applications use a lot of connections for short periods, Oracle
@@ -2770,6 +2778,15 @@ Pool attributes [`poolIncrement`](#proppoolpoolincrement),
2770
2778
Authentication is used, the pool behavior is different, see
2771
2779
[External Authentication](#extauth).
2772
2780
2781
+ The Oracle Real-World Performance Group's general recommendation for
2782
+ client connection pools is for the minimum and maximum number of
2783
+ connections to be the same. This avoids connection storms which can
2784
+ decrease throughput. They also recommend sizing connection pools so
2785
+ that the sum of all connections from all applications accessing a
2786
+ database gives 1-10 connections per database server CPU core.
2787
+ See
2788
+ [About Optimizing Real-World Performance with Static Connection Pools](http://docs.oracle.com/cd/E82638_01/JJUCP/optimizing-real-world-performance.htm#JJUCP-GUID-BC09F045-5D80-4AF5-93F5-FEF0531E0E1D).
2789
+
2773
2790
The Pool attribute [` stmtCacheSize` ](#propconnstmtcachesize) can be
2774
2791
used to set the statement cache size used by connections in the pool,
2775
2792
see [Statement Caching](#stmtcache).
0 commit comments