You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Shaojie Liu <li...@gmail.com> on 2008/12/15 12:03:54 UTC

the /SYSV00000000 file in shared-mapping mem of apache

all,

we have two servers with exactly the same hardware running apache service.
but always, there are difference between apache processes on the two boxes,
in "shared memory" of the output result of cmd- "top".

in detail the difference lies in the file of /SYSV00000000, as is displayed
below(this is the output of a smem.pl tool, which analyze smap msg):
_________________________________________________
SHARED MAPPINGS
     vmsize   rss clean   rss dirty   file
   30720 kb    19856 kb     2676 kb   /SYSV00000000
   30720 kb     9292 kb     2540 kb   /SYSV00000000

what's more, when 'cat /proc/PID/maps',  we saw:
__________________________________________________
8275/maps:2ab550d26000-2ab552b26000 rw-s 00000000 00:09
13139968                   /SYSV00000000 (deleted)
8275/maps:2ab552b26000-2ab554926000 rw-s 00000000 00:09
13172737                   /SYSV00000000 (deleted)
8275/maps:2ab554926000-2ab556726000 rw-s 00000000 00:09
13205506                   /SYSV00000000 (deleted)
8275/maps:2ab556726000-2ab558526000 rw-s 00000000 00:09
13238275                   /SYSV00000000 (deleted)

and output of cmd 'pmap':
__________________________________________________
00002ab550d26000  30720K rw-s-    [ shmid=0xc88000 ]
00002ab552b26000  30720K rw-s-    [ shmid=0xc90001 ]
00002ab554926000  30720K rw-s-    [ shmid=0xc98002 ]
00002ab556726000  30720K rw-s-    [ shmid=0xca0003 ]

and finally output of cmd 'ipcs'
__________________________________________________
# ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 13139968   root      622        31457280   44         dest
0x00000000 13172737   root      622        31457280   44         dest
0x00000000 13205506   root      622        31457280   44         dest
0x00000000 13238275   root      622        31457280   44         dest

platform: gentoo 2.6.18 x86_64 intel 5130, apache 2.0.61, php5, 8G RAM+8G
swap, a lot of free memory.

it seems like, apache is simply utilizing shared memory. but my question
are:
1) is it necessary to use shm? b'coz apache runs happily as well on another
box without quoting the SYSVxx file.
2) if it is necessary, what's that for?