4 * DEBUG: section 13 High Level Memory Pool Management
5 * AUTHOR: Harvest Derived
7 * SQUID Web Proxy Cache http://www.squid-cache.org/
8 * ----------------------------------------------------------
10 * Squid is the result of efforts by numerous individuals from
11 * the Internet community; see the CONTRIBUTORS file for full
12 * details. Many organizations have provided support for Squid's
13 * development; see the SPONSORS file for full details. Squid is
14 * Copyrighted (C) 2001 by the Regents of the University of
15 * California; see the COPYRIGHT file for full details. Squid
16 * incorporates software developed and/or copyrighted by other
17 * sources; see the CREDITS file for full details.
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2 of the License, or
22 * (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
35 #include "squid-old.h"
37 #include "mgr/Registration.h"
38 #include "ClientInfo.h"
42 #include "StoreEntryStream.h"
44 #include "SquidTime.h"
54 const size_t squidSystemPageSize
=getpagesize();
56 /* local prototypes */
57 static void memStringStats(std::ostream
&);
60 static MemAllocator
*MemPools
[MEM_MAX
];
61 static double xm_time
= 0;
62 static double xm_deltat
= 0;
64 /* all pools are ready to be used */
65 static bool MemIsInitialized
= false;
68 #define mem_str_pool_count 6
70 // 4 bytes bigger than the biggest string pool size
71 // which is in turn calculated from SmallestStringBeforeMemIsInitialized
72 static const size_t SmallestStringBeforeMemIsInitialized
= 1024*16+4;
79 StrPoolsAttrs
[mem_str_pool_count
] = {
82 "Short Strings", MemAllocator::RoundedSize(36),
83 }, /* to fit rfc1123 and similar */
85 "Medium Strings", MemAllocator::RoundedSize(128),
86 }, /* to fit most urls */
88 "Long Strings", MemAllocator::RoundedSize(512),
91 "1KB Strings", MemAllocator::RoundedSize(1024),
94 "4KB Strings", MemAllocator::RoundedSize(4*1024),
98 MemAllocator::RoundedSize(SmallestStringBeforeMemIsInitialized
-4)
106 StrPools
[mem_str_pool_count
];
107 static MemMeter StrCountMeter
;
108 static MemMeter StrVolumeMeter
;
110 static MemMeter HugeBufCountMeter
;
111 static MemMeter HugeBufVolumeMeter
;
116 memStringStats(std::ostream
&stream
)
119 int pooled_count
= 0;
120 size_t pooled_volume
= 0;
122 stream
<< "String Pool\t Impact\t\t\n \t (%strings)\t (%volume)\n";
125 for (i
= 0; i
< mem_str_pool_count
; ++i
) {
126 const MemAllocator
*pool
= StrPools
[i
].pool
;
127 const int plevel
= pool
->getMeter().inuse
.level
;
128 stream
<< std::setw(20) << std::left
<< pool
->objectType();
129 stream
<< std::right
<< "\t " << xpercentInt(plevel
, StrCountMeter
.level
);
130 stream
<< "\t " << xpercentInt(plevel
* pool
->objectSize(), StrVolumeMeter
.level
) << "\n";
131 pooled_count
+= plevel
;
132 pooled_volume
+= plevel
* pool
->objectSize();
136 stream
<< std::setw(20) << std::left
<< "Other Strings";
138 stream
<< std::right
<< "\t ";
140 stream
<< xpercentInt(StrCountMeter
.level
- pooled_count
, StrCountMeter
.level
) << "\t ";
142 stream
<< xpercentInt(StrVolumeMeter
.level
- pooled_volume
, StrVolumeMeter
.level
) << "\n\n";
146 memBufStats(std::ostream
& stream
)
148 stream
<< "Large buffers: " <<
149 HugeBufCountMeter
.level
<< " (" <<
150 HugeBufVolumeMeter
.level
/ 1024 << " KB)\n";
154 Mem::Stats(StoreEntry
* sentry
)
156 StoreEntryStream
stream(sentry
);
158 memStringStats(stream
);
161 if (RUNNING_ON_VALGRIND
) {
162 long int leaked
= 0, dubious
= 0, reachable
= 0, suppressed
= 0;
163 stream
<< "Valgrind Report:\n";
164 stream
<< "Type\tAmount\n";
165 debugs(13, 1, "Asking valgrind for memleaks");
166 VALGRIND_DO_LEAK_CHECK
;
167 debugs(13, 1, "Getting valgrind statistics");
168 VALGRIND_COUNT_LEAKS(leaked
, dubious
, reachable
, suppressed
);
169 stream
<< "Leaked\t" << leaked
<< "\n";
170 stream
<< "Dubious\t" << dubious
<< "\n";
171 stream
<< "Reachable\t" << reachable
<< "\n";
172 stream
<< "Suppressed\t" << suppressed
<< "\n";
183 * we have a limit on _total_ amount of idle memory so we ignore max_pages for now.
184 * Will ignore repeated calls for the same pool type.
186 * Relies on Mem::Init() having been called beforehand.
189 memDataInit(mem_type type
, const char *name
, size_t size
, int max_pages_notused
, bool zeroOnPush
)
191 assert(name
&& size
);
193 if (MemPools
[type
] != NULL
)
196 MemPools
[type
] = memPoolCreate(name
, size
);
197 MemPools
[type
]->zeroOnPush(zeroOnPush
);
201 /* find appropriate pool and use it (pools always init buffer with 0s) */
203 memAllocate(mem_type type
)
205 assert(MemPools
[type
]);
206 return MemPools
[type
]->alloc();
209 /* give memory back to the pool */
211 memFree(void *p
, int type
)
213 assert(MemPools
[type
]);
214 MemPools
[type
]->freeOne(p
);
217 /* allocate a variable size buffer using best-fit string pool */
219 memAllocString(size_t net_size
, size_t * gross_size
)
221 MemAllocator
*pool
= NULL
;
224 // if pools are not yet ready, make sure that
225 // the requested size is not poolable so that the right deallocator
227 if (!MemIsInitialized
&& net_size
< SmallestStringBeforeMemIsInitialized
)
228 net_size
= SmallestStringBeforeMemIsInitialized
;
231 for (i
= 0; i
< mem_str_pool_count
; ++i
) {
232 if (net_size
<= StrPoolsAttrs
[i
].obj_size
) {
233 pool
= StrPools
[i
].pool
;
238 *gross_size
= pool
? StrPoolsAttrs
[i
].obj_size
: net_size
;
239 assert(*gross_size
>= net_size
);
240 // may forget [de]allocations until MemIsInitialized
241 memMeterInc(StrCountMeter
);
242 memMeterAdd(StrVolumeMeter
, *gross_size
);
243 return pool
? pool
->alloc() : xcalloc(1, net_size
);
246 extern size_t memStringCount();
252 for (int counter
= 0; counter
< mem_str_pool_count
; ++counter
)
253 result
+= memPoolInUseCount(StrPools
[counter
].pool
);
258 /* free buffer allocated with memAllocString() */
260 memFreeString(size_t size
, void *buf
)
262 MemAllocator
*pool
= NULL
;
265 if (MemIsInitialized
) {
266 for (unsigned int i
= 0; i
< mem_str_pool_count
; ++i
) {
267 if (size
<= StrPoolsAttrs
[i
].obj_size
) {
268 assert(size
== StrPoolsAttrs
[i
].obj_size
);
269 pool
= StrPools
[i
].pool
;
275 // may forget [de]allocations until MemIsInitialized
276 memMeterDec(StrCountMeter
);
277 memMeterDel(StrVolumeMeter
, size
);
278 pool
? pool
->freeOne(buf
) : xfree(buf
);
281 /* Find the best fit MEM_X_BUF type */
283 memFindBufSizeType(size_t net_size
, size_t * gross_size
)
288 if (net_size
<= 2 * 1024) {
291 } else if (net_size
<= 4 * 1024) {
294 } else if (net_size
<= 8 * 1024) {
297 } else if (net_size
<= 16 * 1024) {
300 } else if (net_size
<= 32 * 1024) {
303 } else if (net_size
<= 64 * 1024) {
317 /* allocate a variable size buffer using best-fit pool */
319 memAllocBuf(size_t net_size
, size_t * gross_size
)
321 mem_type type
= memFindBufSizeType(net_size
, gross_size
);
323 if (type
!= MEM_NONE
)
324 return memAllocate(type
);
326 memMeterInc(HugeBufCountMeter
);
327 memMeterAdd(HugeBufVolumeMeter
, *gross_size
);
328 return xcalloc(1, net_size
);
332 /* resize a variable sized buffer using best-fit pool */
334 memReallocBuf(void *oldbuf
, size_t net_size
, size_t * gross_size
)
336 /* XXX This can be optimized on very large buffers to use realloc() */
337 /* TODO: if the existing gross size is >= new gross size, do nothing */
338 size_t new_gross_size
;
339 void *newbuf
= memAllocBuf(net_size
, &new_gross_size
);
342 size_t data_size
= *gross_size
;
344 if (data_size
> net_size
)
345 data_size
= net_size
;
347 memcpy(newbuf
, oldbuf
, data_size
);
349 memFreeBuf(*gross_size
, oldbuf
);
352 *gross_size
= new_gross_size
;
356 /* free buffer allocated with memAllocBuf() */
358 memFreeBuf(size_t size
, void *buf
)
360 mem_type type
= memFindBufSizeType(size
, NULL
);
362 if (type
!= MEM_NONE
)
366 memMeterDec(HugeBufCountMeter
);
367 memMeterDel(HugeBufVolumeMeter
, size
);
371 static double clean_interval
= 15.0; /* time to live of idle chunk before release */
374 Mem::CleanIdlePools(void *unused
)
376 MemPools::GetInstance().clean(static_cast<time_t>(clean_interval
));
377 eventAdd("memPoolCleanIdlePools", CleanIdlePools
, NULL
, clean_interval
, 1);
383 int64_t new_pool_limit
;
385 /** Set to configured value first */
386 if (!Config
.onoff
.mem_pools
)
388 else if (Config
.MemPools
.limit
> 0)
389 new_pool_limit
= Config
.MemPools
.limit
;
391 if (Config
.MemPools
.limit
== 0)
392 debugs(13, 1, "memory_pools_limit 0 has been chagned to memory_pools_limit none. Please update your config");
399 * No debugging here please because this method is called before
400 * the debug log is configured and we'll get the message on
401 * stderr when doing things like 'squid -k reconfigure'
403 if (MemPools::GetInstance().idleLimit() > new_pool_limit
)
404 debugs(13, 1, "Shrinking idle mem pools to "<< std::setprecision(3) << toMB(new_pool_limit
) << " MB");
407 MemPools::GetInstance().setIdleLimit(new_pool_limit
);
410 /* XXX make these classes do their own memory management */
411 #include "HttpHdrContRange.h"
419 * NOTE: Mem::Init() is called before the config file is parsed
420 * and before the debugging module has been initialized. Any
421 * debug messages here at level 0 or 1 will always be printed
426 * Set all pointers to null. */
427 memset(MemPools
, '\0', sizeof(MemPools
));
429 * Then initialize all pools.
431 * Starting with generic 2kB - 64kB buffr pools, then specific object types.
433 * It does not hurt much to have a lot of pools since sizeof(MemPool) is
434 * small; someday we will figure out what to do with all the entries here
435 * that are never used or used only once; perhaps we should simply use
436 * malloc() for those? @?@
438 memDataInit(MEM_2K_BUF
, "2K Buffer", 2048, 10, false);
439 memDataInit(MEM_4K_BUF
, "4K Buffer", 4096, 10, false);
440 memDataInit(MEM_8K_BUF
, "8K Buffer", 8192, 10, false);
441 memDataInit(MEM_16K_BUF
, "16K Buffer", 16384, 10, false);
442 memDataInit(MEM_32K_BUF
, "32K Buffer", 32768, 10, false);
443 memDataInit(MEM_64K_BUF
, "64K Buffer", 65536, 10, false);
444 memDataInit(MEM_ACL_DENY_INFO_LIST
, "acl_deny_info_list",
445 sizeof(acl_deny_info_list
), 0);
446 memDataInit(MEM_ACL_NAME_LIST
, "acl_name_list", sizeof(acl_name_list
), 0);
447 #if USE_CACHE_DIGESTS
449 memDataInit(MEM_CACHE_DIGEST
, "CacheDigest", sizeof(CacheDigest
), 0);
452 memDataInit(MEM_LINK_LIST
, "link_list", sizeof(link_list
), 10);
453 memDataInit(MEM_DLINK_NODE
, "dlink_node", sizeof(dlink_node
), 10);
454 memDataInit(MEM_DREAD_CTRL
, "dread_ctrl", sizeof(dread_ctrl
), 0);
455 memDataInit(MEM_DWRITE_Q
, "dwrite_q", sizeof(dwrite_q
), 0);
456 memDataInit(MEM_HTTP_HDR_CONTENT_RANGE
, "HttpHdrContRange", sizeof(HttpHdrContRange
), 0);
457 memDataInit(MEM_NETDBENTRY
, "netdbEntry", sizeof(netdbEntry
), 0);
458 memDataInit(MEM_NET_DB_NAME
, "net_db_name", sizeof(net_db_name
), 0);
459 memDataInit(MEM_RELIST
, "relist", sizeof(relist
), 0);
460 memDataInit(MEM_CLIENT_INFO
, "ClientInfo", sizeof(ClientInfo
), 0);
461 memDataInit(MEM_MD5_DIGEST
, "MD5 digest", SQUID_MD5_DIGEST_LENGTH
, 0);
462 MemPools
[MEM_MD5_DIGEST
]->setChunkSize(512 * 1024);
464 /** Lastly init the string pools. */
465 for (i
= 0; i
< mem_str_pool_count
; ++i
) {
466 StrPools
[i
].pool
= memPoolCreate(StrPoolsAttrs
[i
].name
, StrPoolsAttrs
[i
].obj_size
);
467 StrPools
[i
].pool
->zeroOnPush(false);
469 if (StrPools
[i
].pool
->objectSize() != StrPoolsAttrs
[i
].obj_size
)
470 debugs(13, 1, "Notice: " << StrPoolsAttrs
[i
].name
<< " is " << StrPools
[i
].pool
->objectSize() << " bytes instead of requested " << StrPoolsAttrs
[i
].obj_size
<< " bytes");
473 MemIsInitialized
= true;
475 * finally register with the cache manager */
476 RegisterWithCacheManager();
482 debugs(13, 3, "Memory pools are '" <<
483 (Config
.onoff
.mem_pools
? "on" : "off") << "'; limit: " <<
484 std::setprecision(3) << toMB(MemPools::GetInstance().idleLimit()) <<
489 Mem::RegisterWithCacheManager(void)
491 Mgr::RegisterAction("mem", "Memory Utilization", Mem::Stats
, 0, 1);
494 mem_type
&operator++ (mem_type
&aMem
)
497 aMem
= (mem_type
)(++tmp
);
502 * Test that all entries are initialized
507 mem_type t
= MEM_NONE
;
509 while (++t
< MEM_DONTFREE
) {
511 * If you hit this assertion, then you forgot to add a
512 * memDataInit() line for type 't'.
513 * Or placed the pool type in the wrong section of the enum list.
522 MemPoolGlobalStats stats
;
523 if (Config
.MemPools
.limit
> 0) // do not reset if disabled or same
524 MemPools::GetInstance().setIdleLimit(0);
525 MemPools::GetInstance().clean(0);
526 memPoolGetGlobalStats(&stats
);
528 if (stats
.tot_items_inuse
)
529 debugs(13, 2, "memCleanModule: " << stats
.tot_items_inuse
<<
530 " items in " << stats
.tot_chunks_inuse
<< " chunks and " <<
531 stats
.tot_pools_inuse
<< " pools are left dirty");
535 memInUse(mem_type type
)
537 return memPoolInUseCount(MemPools
[type
]);
545 memFree(p
, MEM_2K_BUF
);
551 memFree(p
, MEM_4K_BUF
);
557 memFree(p
, MEM_8K_BUF
);
563 memFree(p
, MEM_16K_BUF
);
569 memFree(p
, MEM_32K_BUF
);
575 memFree(p
, MEM_64K_BUF
);
579 cxx_xfree(void * ptr
)
585 memFreeBufFunc(size_t size
)
608 memMeterDec(HugeBufCountMeter
);
609 memMeterDel(HugeBufVolumeMeter
, size
);
617 Mem::PoolReport(const MemPoolStats
* mp_st
, const MemPoolMeter
* AllMeter
, std::ostream
&stream
)
621 MemPoolMeter
*pm
= mp_st
->meter
;
622 const char *delim
= "\t ";
625 stream
.setf(std::ios_base::fixed
);
627 stream
<< std::setw(20) << std::left
<< mp_st
->label
<< delim
;
628 stream
<< std::setw(4) << std::right
<< mp_st
->obj_size
<< delim
;
631 if (mp_st
->chunk_capacity
) {
632 stream
<< std::setw(4) << toKB(mp_st
->obj_size
* mp_st
->chunk_capacity
) << delim
;
633 stream
<< std::setw(4) << mp_st
->chunk_capacity
<< delim
;
635 needed
= mp_st
->items_inuse
/ mp_st
->chunk_capacity
;
637 if (mp_st
->items_inuse
% mp_st
->chunk_capacity
)
640 excess
= mp_st
->chunks_inuse
- needed
;
642 stream
<< std::setw(4) << mp_st
->chunks_alloc
<< delim
;
643 stream
<< std::setw(4) << mp_st
->chunks_inuse
<< delim
;
644 stream
<< std::setw(4) << mp_st
->chunks_free
<< delim
;
645 stream
<< std::setw(4) << mp_st
->chunks_partial
<< delim
;
646 stream
<< std::setprecision(3) << xpercent(excess
, needed
) << delim
;
657 * Fragmentation calculation:
658 * needed = inuse.level / chunk_capacity
659 * excess = used - needed
660 * fragmentation = excess / needed * 100%
662 * Fragm = (alloced - (inuse / obj_ch) ) / alloced
665 stream
<< mp_st
->items_alloc
<< delim
;
666 stream
<< toKB(mp_st
->obj_size
* pm
->alloc
.level
) << delim
;
667 stream
<< toKB(mp_st
->obj_size
* pm
->alloc
.hwater_level
) << delim
;
668 stream
<< std::setprecision(2) << ((squid_curtime
- pm
->alloc
.hwater_stamp
) / 3600.) << delim
;
669 stream
<< std::setprecision(3) << xpercent(mp_st
->obj_size
* pm
->alloc
.level
, AllMeter
->alloc
.level
) << delim
;
671 stream
<< mp_st
->items_inuse
<< delim
;
672 stream
<< toKB(mp_st
->obj_size
* pm
->inuse
.level
) << delim
;
673 stream
<< toKB(mp_st
->obj_size
* pm
->inuse
.hwater_level
) << delim
;
674 stream
<< std::setprecision(2) << ((squid_curtime
- pm
->inuse
.hwater_stamp
) / 3600.) << delim
;
675 stream
<< std::setprecision(3) << xpercent(pm
->inuse
.level
, pm
->alloc
.level
) << delim
;
677 stream
<< mp_st
->items_idle
<< delim
;
678 stream
<< toKB(mp_st
->obj_size
* pm
->idle
.level
) << delim
;
679 stream
<< toKB(mp_st
->obj_size
* pm
->idle
.hwater_level
) << delim
;
681 stream
<< (int)pm
->gb_saved
.count
<< delim
;
682 stream
<< std::setprecision(3) << xpercent(pm
->gb_saved
.count
, AllMeter
->gb_allocated
.count
) << delim
;
683 stream
<< std::setprecision(3) << xpercent(pm
->gb_saved
.bytes
, AllMeter
->gb_allocated
.bytes
) << delim
;
684 stream
<< std::setprecision(3) << xdiv(pm
->gb_allocated
.count
- pm
->gb_oallocated
.count
, xm_deltat
) << "\n";
685 pm
->gb_oallocated
.count
= pm
->gb_allocated
.count
;
689 MemPoolReportSorter(const void *a
, const void *b
)
691 const MemPoolStats
*A
= (MemPoolStats
*) a
;
692 const MemPoolStats
*B
= (MemPoolStats
*) b
;
694 // use this to sort on %Total Allocated
696 double pa
= (double) A
->obj_size
* A
->meter
->alloc
.level
;
697 double pb
= (double) B
->obj_size
* B
->meter
->alloc
.level
;
706 // use this to sort on In Use high(hrs)
708 if (A
->meter
->inuse
.hwater_stamp
> B
->meter
->inuse
.hwater_stamp
)
711 if (B
->meter
->inuse
.hwater_stamp
> A
->meter
->inuse
.hwater_stamp
)
720 Mem::Report(std::ostream
&stream
)
723 static MemPoolStats mp_stats
;
724 static MemPoolGlobalStats mp_total
;
726 MemPoolIterator
*iter
;
730 stream
<< "Current memory usage:\n";
732 stream
<< "Pool\t Obj Size\t"
733 "Chunks\t\t\t\t\t\t\t"
734 "Allocated\t\t\t\t\t"
737 "Allocations Saved\t\t\t"
742 "(#)\t used\t free\t part\t %Frag\t "
743 "(#)\t (KB)\t high (KB)\t high (hrs)\t %Tot\t"
744 "(#)\t (KB)\t high (KB)\t high (hrs)\t %alloc\t"
745 "(#)\t (KB)\t high (KB)\t"
746 "(#)\t %cnt\t %vol\t"
749 xm_deltat
= current_dtime
- xm_time
;
750 xm_time
= current_dtime
;
752 /* Get stats for Totals report line */
753 memPoolGetGlobalStats(&mp_total
);
755 MemPoolStats
*sortme
= (MemPoolStats
*) xcalloc(mp_total
.tot_pools_alloc
,sizeof(*sortme
));
759 iter
= memPoolIterate();
761 while ((pool
= memPoolIterateNext(iter
))) {
762 pool
->getStats(&mp_stats
);
764 if (!mp_stats
.pool
) /* pool destroyed */
767 if (mp_stats
.pool
->getMeter().gb_allocated
.count
> 0) /* this pool has been used */
768 sortme
[npools
++] = mp_stats
;
773 memPoolIterateDone(&iter
);
775 qsort(sortme
, npools
, sizeof(*sortme
), MemPoolReportSorter
);
777 for (int i
= 0; i
< npools
; ++i
) {
778 PoolReport(&sortme
[i
], mp_total
.TheMeter
, stream
);
783 mp_stats
.pool
= NULL
;
784 mp_stats
.label
= "Total";
785 mp_stats
.meter
= mp_total
.TheMeter
;
786 mp_stats
.obj_size
= 1;
787 mp_stats
.chunk_capacity
= 0;
788 mp_stats
.chunk_size
= 0;
789 mp_stats
.chunks_alloc
= mp_total
.tot_chunks_alloc
;
790 mp_stats
.chunks_inuse
= mp_total
.tot_chunks_inuse
;
791 mp_stats
.chunks_partial
= mp_total
.tot_chunks_partial
;
792 mp_stats
.chunks_free
= mp_total
.tot_chunks_free
;
793 mp_stats
.items_alloc
= mp_total
.tot_items_alloc
;
794 mp_stats
.items_inuse
= mp_total
.tot_items_inuse
;
795 mp_stats
.items_idle
= mp_total
.tot_items_idle
;
796 mp_stats
.overhead
= mp_total
.tot_overhead
;
798 PoolReport(&mp_stats
, mp_total
.TheMeter
, stream
);
801 stream
<< "Cumulative allocated volume: "<< double_to_str(buf
, 64, mp_total
.TheMeter
->gb_allocated
.bytes
) << "\n";
803 stream
<< "Current overhead: " << mp_total
.tot_overhead
<< " bytes (" <<
804 std::setprecision(3) << xpercent(mp_total
.tot_overhead
, mp_total
.TheMeter
->inuse
.level
) << "%)\n";
806 if (mp_total
.mem_idle_limit
>= 0)
807 stream
<< "Idle pool limit: " << std::setprecision(2) << toMB(mp_total
.mem_idle_limit
) << " MB\n";
809 stream
<< "Total Pools created: " << mp_total
.tot_pools_alloc
<< "\n";
810 stream
<< "Pools ever used: " << mp_total
.tot_pools_alloc
- not_used
<< " (shown above)\n";
811 stream
<< "Currently in use: " << mp_total
.tot_pools_inuse
<< "\n";