
Ok, so what happened here? Well we migrated our two singlethreading BIND8 processes to one multithreading BIND9 process. The query-load did not change at all, but keeping its in-memory database in order using a modell that is thread-safe seems to have cost us a huge amount of user cpu time. Wasn't BIND9 supposed to even work better on an SMP system with two CPUs than two BIND8 processes for it only needs to keep one database in order? Well apparently not. Lets ask the bind9-workers Mailinglist i thought, and i got the following very helpful replies from Jinmei Tatuya:
I'd first like to recommend disabling threads. From my experiences,
enable-threads buys almost nothing for most OSes, unfortunately. If
you can allow the configuration with 2 named processes, it should
provide better performance than a single BIND9 process with 2 threads.
Secondly, according to your memory usage and configuration (i.e.,
max-cache-size=700M, 623m used), it looks like named reaches the
high-water mark for the specified maximum, and tries to purge some
cache entries. If this periodically happens, it may be the reason for
the high CPU usage. So, if possible, it might help if you can add
more memory which can afford the typical use case under the high-water
level.
...
If you go with disabling threads, you may also want to enable
"internal memory allocation". (I hear that) it should use memory more
efficiently (and can make the server faster) but is disabled by
default due to response-performance reasons in the threaded case. You
can enable this feature by adding the following line
#define ISC_MEM_USE_INTERNAL_MALLOC 1
just before the following part of bind9/lib/isc/mem.c:
#ifndef ISC_MEM_USE_INTERNAL_MALLOC
#define ISC_MEM_USE_INTERNAL_MALLOC 0
#endif
注:9.6.1-P1版本位置:lib/isc/include/isc/mem.h,其中已经设置:#define ISC_MEM_USE_INTERNAL_MALLOC 1I opted for the latter option, to disable threading, and applied this patch and set up my BIND9 configuration and loadbalancer to support two processes. You can achieve this by taking care never to bind more than one BIND9 process to the same IP-Address, giving it a custom pidfile and last but not least configure rndc to connect for another port on localhost for the second process.


From:http://zaphods.net/~zaphodb/high-performance-bind9.html
本日志由 flyinweb 于 2009-09-27 15:04:21 发表,目前已经被浏览 4230 次,评论 0 次;
作者添加了以下标签: BIND,caching-only;
引用通告:http://www.517sou.net/Article/265/Trackback.ashx
It is quite useful and interesting too.
VIRT 的上限是64G,也就是36位, cat /proc/cpuinfo的结果是:addre
昨天要准备用线程重写webbench,试验了下Fedora Linux 2.6.35.14
不明白您的具体的意思是什么?
已经发送到你QQ邮箱
http://www.2mysite.net/scriptencoder/screnc.asp 站长你好,看
你好,我发现一个问题,就是从mysqld2同步过来的数据,在mysqld1的
晕,我说是怎么回事情,原来我和你一样,忘记设置了活动分区