
david at kineticode
Aug 23, 2006, 2:33 PM
Post #1 of 1
(175 views)
Permalink
|
Fellow Bricoleurs, If you're running Bricolage on a box using the 2.6 Linux kernel and rely on Apache::SizeLimit to manage memory control, be sure that you read this bit of the docs for the latest version of Apache::SizeLimit (0.9): =head2 linux For linux we read the process size out of F</proc/self/statm>. If you are worried about performance, you can consider using C<< Apache::SizeLimit->set_check_interval() >> to reduce how often this read happens. As of linux 2.6, F</proc/self/statm> does not report the amount of memory shared by the copy-on-write mechanism as shared memory. This means that decisions made based on shared memory as reported by that interface are inherently wrong. However, as of the 2.6.14 release of the kernel, there is F</proc/self/smaps> entry for each process. F</proc/self/smaps> reports various sizes for each memory segment of a process and allows us to count the amount of shared memory correctly. If C<Apache::SizeLimit> detects a kernel that supports F</proc/self/smaps> and the C<Linux::Smaps> module is installed it will use that module instead of F</proc/self/statm>. Reading F</proc/self/smaps> is expensive compared to F</proc/self/statm>. It must look at each page table entry of a process. Further, on multiprocessor systems the access is synchronized with spinlocks. Again, you might consider using C<< Apache::SizeLimit->set_check_interval() >>. Also, in order for 0.09 to work with Bricolage, you'll need to apply this patch (it will be in the next version of Apache::SizeLimit): http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=115438042519704 Best, David
|