blob: efe0ced127c0b5303426277ab9d0db8ba4640a5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
|
/*-
* Automatically built by dist/s_java_stat.
* Only the javadoc comments can be edited.
*
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.
*/
package com.sleepycat.db;
/**
Cache statistics for a database environment.
*/
public class CacheStats {
// no public constructor
/* package */ CacheStats() {}
private int st_gbytes;
/**
Gigabytes of cache (total cache size is st_gbytes + st_bytes).
*/
public int getGbytes() {
return st_gbytes;
}
private int st_bytes;
/**
Bytes of cache (total cache size is st_gbytes + st_bytes).
*/
public int getBytes() {
return st_bytes;
}
private int st_ncache;
/**
Number of caches.
*/
public int getNumCache() {
return st_ncache;
}
private int st_max_ncache;
/**
Maximum number of caches, as configured with
{@link EnvironmentConfig#setCacheMax}.
*/
public int getMaxNumCache() {
return st_max_ncache;
}
private long st_mmapsize;
/**
Maximum file size for mmap.
*/
public long getMmapSize() {
return st_mmapsize;
}
private int st_maxopenfd;
/**
Maximum number of open file descriptors.
*/
public int getMaxOpenfd() {
return st_maxopenfd;
}
private int st_maxwrite;
/**
The maximum number of sequential write operations scheduled by the library
when flushing dirty pages from the cache.
*/
public int getMaxWrite() {
return st_maxwrite;
}
private int st_maxwrite_sleep;
/**
The number of microseconds the thread of control should pause before
scheduling further write operations.
*/
public int getMaxWriteSleep() {
return st_maxwrite_sleep;
}
private int st_pages;
/**
Pages in the cache.
*/
public int getPages() {
return st_pages;
}
private int st_map;
/**
Requested pages mapped into the process' address space (there is no
available information about whether or not this request caused disk I/O,
although examining the application page fault rate may be helpful).
*/
public int getMap() {
return st_map;
}
private long st_cache_hit;
/**
Requested pages found in the cache.
*/
public long getCacheHit() {
return st_cache_hit;
}
private long st_cache_miss;
/**
Requested pages not found in the cache.
*/
public long getCacheMiss() {
return st_cache_miss;
}
private long st_page_create;
/**
Pages created in the cache.
*/
public long getPageCreate() {
return st_page_create;
}
private long st_page_in;
/**
Pages read into the cache.
*/
public long getPageIn() {
return st_page_in;
}
private long st_page_out;
/**
Pages written from the cache to the backing file.
*/
public long getPageOut() {
return st_page_out;
}
private long st_ro_evict;
/**
Clean pages forced from the cache.
*/
public long getRoEvict() {
return st_ro_evict;
}
private long st_rw_evict;
/**
Dirty pages forced from the cache.
*/
public long getRwEvict() {
return st_rw_evict;
}
private long st_page_trickle;
/**
Dirty pages written using {@link com.sleepycat.db.Environment#trickleCacheWrite Environment.trickleCacheWrite}.
*/
public long getPageTrickle() {
return st_page_trickle;
}
private int st_page_clean;
/**
Clean pages currently in the cache.
*/
public int getPageClean() {
return st_page_clean;
}
private int st_page_dirty;
/**
Dirty pages currently in the cache.
*/
public int getPageDirty() {
return st_page_dirty;
}
private int st_hash_buckets;
/**
Number of hash buckets in the buffer hash table.
*/
public int getHashBuckets() {
return st_hash_buckets;
}
private int st_hash_mutexes;
/** The number of hash bucket mutexes in the buffer hash table. */
public int getHashMutexes() {
return st_hash_mutexes;
}
private int st_pagesize;
/**
Page size in bytes.
*/
public int getPageSize() {
return st_pagesize;
}
private int st_hash_searches;
/**
Total number of buffer hash table lookups.
*/
public int getHashSearches() {
return st_hash_searches;
}
private int st_hash_longest;
/**
The longest chain ever encountered in buffer hash table lookups.
*/
public int getHashLongest() {
return st_hash_longest;
}
private long st_hash_examined;
/**
Total number of hash elements traversed during hash table lookups.
*/
public long getHashExamined() {
return st_hash_examined;
}
private long st_hash_nowait;
/**
The number of times that a thread of control was able to obtain a
hash bucket lock without waiting.
*/
public long getHashNowait() {
return st_hash_nowait;
}
private long st_hash_wait;
/**
The number of times that a thread of control was forced to wait
before obtaining a hash bucket lock.
*/
public long getHashWait() {
return st_hash_wait;
}
private long st_hash_max_nowait;
/**
The number of times a thread of control was able to obtain the
hash bucket lock without waiting on the bucket which had the
maximum number of times that a thread of control needed to wait.
*/
public long getHashMaxNowait() {
return st_hash_max_nowait;
}
private long st_hash_max_wait;
/**
The maximum number of times any hash bucket lock was waited for by
a thread of control.
*/
public long getHashMaxWait() {
return st_hash_max_wait;
}
private long st_region_nowait;
/**
The number of times that a thread of control was able to obtain a
cache region mutex without waiting.
*/
public long getRegionNowait() {
return st_region_nowait;
}
private long st_region_wait;
/**
The number of times that a thread of control was forced to wait
before obtaining a cache region mutex.
*/
public long getRegionWait() {
return st_region_wait;
}
private long st_mvcc_frozen;
/**
Number of buffers frozen.
*/
public long getMultiversionFrozen() {
return st_mvcc_frozen;
}
private long st_mvcc_thawed;
/**
Number of buffers thawed.
*/
public long getMultiversionThawed() {
return st_mvcc_thawed;
}
private long st_mvcc_freed;
/**
Number of frozen buffers freed.
*/
public long getMultiversionFreed() {
return st_mvcc_freed;
}
private long st_mvcc_reused;
/**
Number of outdated intermediate versions reused.
*/
public long getMultiversionReused() {
return st_mvcc_reused;
}
private long st_alloc;
/**
Number of page allocations.
*/
public long getAlloc() {
return st_alloc;
}
private long st_alloc_buckets;
/**
Number of hash buckets checked during allocation.
*/
public long getAllocBuckets() {
return st_alloc_buckets;
}
private long st_alloc_max_buckets;
/**
Maximum number of hash buckets checked during an allocation.
*/
public long getAllocMaxBuckets() {
return st_alloc_max_buckets;
}
private long st_alloc_pages;
/**
Number of pages checked during allocation.
*/
public long getAllocPages() {
return st_alloc_pages;
}
private long st_alloc_max_pages;
/**
Maximum number of pages checked during an allocation.
*/
public long getAllocMaxPages() {
return st_alloc_max_pages;
}
private long st_io_wait;
/**
Number of operations blocked waiting for I/O to complete.
*/
public long getIoWait() {
return st_io_wait;
}
private long st_sync_interrupted;
/**
Number of mpool sync operations interrupted.
*/
public long getSyncInterrupted() {
return st_sync_interrupted;
}
private int st_oddfsize_detect;
/** TODO */
/* package */ int getOddfSizeDetect() {
return st_oddfsize_detect;
}
private int st_oddfsize_resolve;
/** TODO */
/* package */ int getOddfSizeResolve() {
return st_oddfsize_resolve;
}
private long st_regsize;
/**
Individual cache size.
*/
public long getRegSize() {
return st_regsize;
}
private long st_regmax;
/** The maximum size, in bytes, of the mutex region. */
public long getRegmax() {
return st_regmax;
}
/**
For convenience, the CacheStats class has a toString method that
lists all the data fields.
*/
public String toString() {
return "CacheStats:"
+ "\n st_gbytes=" + st_gbytes
+ "\n st_bytes=" + st_bytes
+ "\n st_ncache=" + st_ncache
+ "\n st_max_ncache=" + st_max_ncache
+ "\n st_mmapsize=" + st_mmapsize
+ "\n st_maxopenfd=" + st_maxopenfd
+ "\n st_maxwrite=" + st_maxwrite
+ "\n st_maxwrite_sleep=" + st_maxwrite_sleep
+ "\n st_pages=" + st_pages
+ "\n st_map=" + st_map
+ "\n st_cache_hit=" + st_cache_hit
+ "\n st_cache_miss=" + st_cache_miss
+ "\n st_page_create=" + st_page_create
+ "\n st_page_in=" + st_page_in
+ "\n st_page_out=" + st_page_out
+ "\n st_ro_evict=" + st_ro_evict
+ "\n st_rw_evict=" + st_rw_evict
+ "\n st_page_trickle=" + st_page_trickle
+ "\n st_page_clean=" + st_page_clean
+ "\n st_page_dirty=" + st_page_dirty
+ "\n st_hash_buckets=" + st_hash_buckets
+ "\n st_hash_mutexes=" + st_hash_mutexes
+ "\n st_pagesize=" + st_pagesize
+ "\n st_hash_searches=" + st_hash_searches
+ "\n st_hash_longest=" + st_hash_longest
+ "\n st_hash_examined=" + st_hash_examined
+ "\n st_hash_nowait=" + st_hash_nowait
+ "\n st_hash_wait=" + st_hash_wait
+ "\n st_hash_max_nowait=" + st_hash_max_nowait
+ "\n st_hash_max_wait=" + st_hash_max_wait
+ "\n st_region_nowait=" + st_region_nowait
+ "\n st_region_wait=" + st_region_wait
+ "\n st_mvcc_frozen=" + st_mvcc_frozen
+ "\n st_mvcc_thawed=" + st_mvcc_thawed
+ "\n st_mvcc_freed=" + st_mvcc_freed
+ "\n st_mvcc_reused=" + st_mvcc_reused
+ "\n st_alloc=" + st_alloc
+ "\n st_alloc_buckets=" + st_alloc_buckets
+ "\n st_alloc_max_buckets=" + st_alloc_max_buckets
+ "\n st_alloc_pages=" + st_alloc_pages
+ "\n st_alloc_max_pages=" + st_alloc_max_pages
+ "\n st_io_wait=" + st_io_wait
+ "\n st_sync_interrupted=" + st_sync_interrupted
+ "\n st_regsize=" + st_regsize
+ "\n st_regmax=" + st_regmax
;
}
}
|