0

我正在尝试使用 Postgres 9.3.1 和 CentOS 版本 6.3(最终版)调试一些共享内存问题。使用 top,我可以看到许多 postgres 连接都在使用共享内存:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3534 postgres  20   0 2330m 1.4g 1.1g S  0.0 20.4   1:06.99 postgres: deploy mtalcott 10.222.154.172(53495) idle
 9143 postgres  20   0 2221m 1.1g 983m S  0.0 16.9   0:14.75 postgres: deploy mtalcott 10.222.154.167(35811) idle
 6026 postgres  20   0 2341m 1.1g 864m S  0.0 16.4   0:46.56 postgres: deploy mtalcott 10.222.154.167(37110) idle
18538 postgres  20   0 2327m 1.1g 865m S  0.0 16.1   2:06.59 postgres: deploy mtalcott 10.222.154.172(47796) idle
 1575 postgres  20   0 2358m 1.1g 858m S  0.0 15.9   1:41.76 postgres: deploy mtalcott 10.222.154.172(52560) idle 
  ...

总共大约有 29 个空闲连接。但是,sudo ipcs -m仅显示:

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x0052e2c1 163840     postgres   600        48         21

令人惊讶的是,它只使用 48 个字节显示它。为什么不ipcs显示更大的细分?我应该使用不同的命令吗?

4

1 回答 1

1

我认为这是因为您的 postgre 是 9.3 版,它使用 POSIX 类型的共享内存。ipcs -m 显示 sysV 共享内存段,这些段在 Postgre 之前的版本中使用过。

于 2014-01-15T13:26:35.613 回答