[use Perl] Stories for 2009-10-09
[email protected] Fri, 09 Oct 2009 02:03:36 +0000
| Newsgroups | perl.daily.news |
|---|---|
| Message-ID | <1255053816.070231-9334-slash-8dkjzd1.ch3.sourceforge.com@use.perl.org> |
use Perl Daily Newsletter
In this issue:
* Measuring copy-on-write on Linux
* Measuring copy-on-write on Linux
+--------------------------------------------------------------------+
| Measuring copy-on-write on Linux |
| posted by AndyArmstrong on Thursday October 08, @15:23 (User Jour|
| http://use.perl.org/article.pl?sid=09/10/08/193244 |
+--------------------------------------------------------------------+
[0]http://perlmonks.org/?node=Corion asked about measuring memory
allocation in IRC but I was reminded of something I've poked at recently
which is measuring how much memory is copy-on-write shared between forked
mod_perl processes. Thus far, when on Linux the only answer I know of is
to use the exmap kernel module. The main page is
[1]http://www.berthels.co.uk/exmap/ but Dave Olszewski wrote some bug
fixes for it at [2]http://github.com/cxreg/exmap. exmap uses a kernel
module to add a new /proc/exmap file. To read physical page stats, write
the PID to this file, then read the results. The exmap distribution comes
with a C++ and perl GTK program to interpret the kernel data. Below is
what I know of the format for the kernel data.
To use:
$ echo $pid > /proc/exmap
$ cat /proc/exmap
VMA 400000 87
1 0 1c6e7
1 0 1c6e8
1 0 1d328
...
$ grep 400000 /proc/$pid/maps
00400000-00457000 r-xp 00000000 08:01 722755 /usr/bin/screen
The sections provided by /proc/exmap correspond to each of the chunks in
/proc/$pid/maps. Each line then details a page, whether it is swapped,
and whether it is writable.
(
VMA $address $page_count
( $resident $writable $page_id )+
)+
Anyway, just thought I'd share. If you know a better trick, I'd love to
hear of it. When I next get around to improving my search servers I'll
likely actually try to use this but for now this is just a tool I think I
plan to use but haven't done serious work with yet.
Discuss this story at:
http://use.perl.org/comments.pl?sid=09/10/08/193244
Links:
0. http://perlmonks.org/?node=Corion
1. http://www.berthels.co.uk/exmap/
2. http://github.com/cxreg/exmap
+--------------------------------------------------------------------+
| Measuring copy-on-write on Linux |
| posted by AndyArmstrong on Thursday October 08, @15:26 (Index) |
| http://use.perl.org/article.pl?sid=09/10/08/196225 |
+--------------------------------------------------------------------+
[0]http://perlmonks.org/?node=Corion asked about measuring memory
allocation in IRC but I was reminded of something I've poked at recently
which is measuring how much memory is copy-on-write shared between forked
mod_perl processes. Thus far, when on Linux the only answer I know of is
to use the exmap kernel module. The main page is
[1]http://www.berthels.co.uk/exmap/ but Dave Olszewski wrote some bug
fixes for it at [2]http://github.com/cxreg/exmap. exmap uses a kernel
module to add a new /proc/exmap file. To read physical page stats, write
the PID to this file, then read the results. The exmap distribution comes
with a C++ and perl GTK program to interpret the kernel data. Below is
what I know of the format for the kernel data.
To use:
$ echo $pid > /proc/exmap
$ cat /proc/exmap
VMA 400000 87
1 0 1c6e7
1 0 1c6e8
1 0 1d328
...
$ grep 400000 /proc/$pid/maps
00400000-00457000 r-xp 00000000 08:01 722755 /usr/bin/screen
The sections provided by /proc/exmap correspond to each of the chunks in
/proc/$pid/maps. Each line then details a page, whether it is swapped,
and whether it is writable.
(
VMA $address $page_count
( $resident $writable $page_id )+
)+
Anyway, just thought I'd share. If you know a better trick, I'd love to
hear of it. When I next get around to improving my search servers I'll
likely actually try to use this but for now this is just a tool I think I
plan to use but haven't done serious work with yet.
Discuss this story at:
http://use.perl.org/comments.pl?sid=09/10/08/196225
Links:
0. http://perlmonks.org/?node=Corion
1. http://www.berthels.co.uk/exmap/
2. http://github.com/cxreg/exmap
Copyright 1997-2008 pudge. All rights reserved.
======================================================================
# Unsubscribe mailto:[email protected]
# News, archives, discussion http://use.perl.org/
# Perl News in The Perl Journal http://www.tpj.com/
# Feedback and news ideas mailto:[email protected]
# http://use.perl.org/submit.pl