Consider tuning your Data Caches
Bonjour,
J'ai des problèmes de cache sur un de mes serveurs et j'essaie de comprendre ce qui ne va pas, j'ai fait quelques changements suivant les recommendations de sybase, mais rien n'y fait. J'utilise sybase ASE 12.5.0.3. Le serveur en question ne contient que deux bases de données, la plus imposante de 12 000MB présente des problèmes de performance lorsqu'il y a environ 300 clients connectés sur cette base de données. J'ai roulé sp_sysmon '00:30:00' sur le serveur et la quantité de Cache Search Misses est énorme:
Citation:
===============================================================================
Task Management per sec per xact count % of total
--------------------------- ------------ ------------ ---------- ----------
Connections Opened 0.0 0.0 2 n/a
Task Context Switches by Engine
Engine 0 3480.7 8342.5 6265241 50.2 %
Engine 1 3450.0 8268.9 6209946 49.8 %
------------------------- ------------ ------------ ----------
Total Task Switches: 6930.7 16611.4 12475187
Task Context Switches Due To:
Voluntary Yields 2.1 5.1 3795 0.0 %
Cache Search Misses 5902.6 14147.3 10624598 85.2 %
System Disk Writes 0.2 0.5 394 0.0 %
I/O Pacing 0.4 0.9 699 0.0 %
Logical Lock Contention 0.0 0.0 5 0.0 %
Address Lock Contention 1.9 4.5 3371 0.0 %
Latch Contention 0.0 0.0 7 0.0 %
Log Semaphore Contention 0.0 0.0 0 0.0 %
PLC Lock Contention 0.0 0.0 0 0.0 %
Group Commit Sleeps 0.0 0.0 0 0.0 %
Last Log Page Writes 0.5 1.3 974 0.0 %
Modify Conflicts 0.0 0.1 59 0.0 %
I/O Device Contention 0.0 0.0 0 0.0 %
Network Packet Received 38.2 91.7 68843 0.6 %
Network Packet Sent 407.0 975.5 732614 5.9 %
Other Causes 577.7 1384.6 1039828 8.3 %
Tuning Recommendations for Task Management
------------------------------------------
- Consider tuning your Data Caches.
Look into the Data Cache management section for
more details on this.
===============================================================================
Data Cache Management
---------------------
Cache Statistics Summary (All Caches)
-------------------------------------
per sec per xact count % of total
------------ ------------ ---------- ----------
Cache Search Summary
Total Cache Hits 153348.3 367545.8 276026924 95.6 %
Total Cache Misses 7083.2 16977.1 12749831 4.4 %
------------------------- ------------ ------------ ----------
Total Cache Searches 160431.5 384523.0 288776755
Cache Turnover
Buffers Grabbed 6984.8 16741.3 12572720 n/a
Buffers Grabbed Dirty 0.0 0.0 0 0.0 %
Cache Strategy Summary
Cached (LRU) Buffers 156504.6 375110.9 281708271 99.9 %
Discarded (MRU) Buffers 104.2 249.7 187500 0.1 %
Large I/O Usage
Large I/Os Performed 6585.6 15784.5 11854134 99.1 %
Large I/Os Denied due to
Pool < Prefetch Size 61.8 148.1 111235 0.9 %
------------------------- ------------ ------------ ----------
Total Large I/O Requests 6647.4 15932.6 11965369
Large I/O Effectiveness
Pages by Lrg I/O Cached 52685.0 126275.7 94833072 n/a
Pages by Lrg I/O Used 53031.1 127105.3 95456050 100.7 %
Asynchronous Prefetch Activity
APFs Issued 1064.2 2550.6 1915484 6.5 %
APFs Denied Due To
APF I/O Overloads 0.0 0.0 0 0.0 %
APF Limit Overloads 3.2 7.7 5789 0.0 %
APF Reused Overloads 1.0 2.4 1800 0.0 %
APF Buffers Found in Cache
With Spinlock Held 0.9 2.2 1651 0.0 %
W/o Spinlock Held 15274.0 36608.8 27493171 93.5 %
------------------------- ------------ ------------ ----------
Total APFs Requested 16343.3 39171.6 29417895
Other Asynchronous Prefetch Statistics
APFs Used 1063.1 2548.0 1913579 n/a
APF Waits for I/O 557.3 1335.7 1003142 n/a
APF Discards 0.0 0.0 0 n/a
Dirty Read Behavior
Page Requests 0.0 0.0 0 n/a
-------------------------------------------------------------------------------
Cache: data_cache_01
per sec per xact count % of total
------------------------- ------------ ------------ ---------- ----------
Spinlock Contention n/a n/a n/a 3.0 %
Utilization n/a n/a n/a 98.2 %
Cache Searches
Cache Hits 150577.9 360905.8 271040259 95.6 %
Found in Wash 617.8 1480.6 1111956 0.4 %
Cache Misses 6969.4 16704.3 12544930 4.4 %
------------------------- ------------ ------------ ----------
Total Cache Searches 157547.3 377610.1 283585189
Pool Turnover
2 Kb Pool
LRU Buffer Grab 399.1 956.6 718433 5.7 %
Grabbed Dirty 0.0 0.0 0 0.0 %
16 Kb Pool
LRU Buffer Grab 6585.6 15784.4 11854076 94.3 %
Grabbed Dirty 0.0 0.0 0 0.0 %
------------------------- ------------ ------------ ----------
Total Cache Turnover 6984.7 16741.0 12572509
Buffer Wash Behavior
Buffers Passed Clean 7347.4 17610.3 13225304 100.0 %
Buffers Already in I/O 0.0 0.0 0 0.0 %
Buffers Washed Dirty 1.0 2.4 1839 0.0 %
Cache Strategy
Cached (LRU) Buffers 153889.7 368843.6 277001507 100.0 %
Discarded (MRU) Buffers 0.0 0.0 0 0.0 %
Large I/O Usage
Large I/Os Performed 6585.6 15784.4 11854076 99.1 %
Large I/Os Denied due to
Pool < Prefetch Size 61.8 148.1 111235 0.9 %
------------------------- ------------ ------------ ----------
Total Large I/O Requests 6647.4 15932.5 11965311
Large I/O Detail
16 Kb Pool
Pages Cached 52684.8 126275.1 94832608 n/a
Pages Used 52650.6 126193.2 94771118 99.9 %
Dirty Read Behavior
\t Page Requests 0.0 0.0 0 n/a
Tuning Recommendations for Data cache : data_cache_01
-------------------------------------
- Consider using 'relaxed LRU replacement policy'
for this cache.
-------------------------------------------------------------------------------
Voici les informations de mon cache :
Cache: data_cache_01, Status: Active, Type: Mixed
Config Size: 100.00 Mb, Run Size: 100.00 Mb
Config Replacement: strict LRU, Run Replacement: strict LRU
Config Partition: 4, Run Partition: 4
IO Size Wash Size Config Size Run Size APF Percent
2 Kb 10240 Kb 50.00 Mb 50.00 Mb 10
16 Kb 10240 Kb 50.00 Mb 50.00 Mb 10
------------------ Cache Binding Information: ------------------
Cache Name Entity Name Type Index Name Status
---------- ----------- ---- ---------- ------
data_cache_01 customers database V
(return status = 0)
Jai essayé de mettre dans differents cache mes plus grosses tables qui ont 7, 5 et 3 millions d'enregistrements, j'ai mis les indexes sur une cache separée et la performance était toujours mauvaise. Ce que j'ai en ce moment, mettre toute la base de donnée dans la cache, c'est le moins pire que j'ai eu comme résultat, mais quand même je sais qu'il y a lieu à une amélioration.
Si vous avez des pistes ou des suggestions sur la configuration, je vous en serai très reconnaissante.
Merci,
Lissmuy