Issue 2991: show-caches sometimes shows negative value for memory used
Status:  New
Owner: ----
Reported by lawren...@gmail.com, Oct 28, 2014
Affected Version: 2.9, 2.9.1

What steps will reproduce the problem?
1. ssh $gerrit show-caches
2. Sometimes, memory used is negative

"""
(...)
SSH:      2  users, oldest session started 19 hrs 11 min ago
Tasks:    4  total =    2 running +      0 ready +    2 sleeping
Mem:   6.05g total = -1124766.43k used +   1.35g free +   5.77g buffers
      10.67g max
          30 open files,        4 cpus available,       70 threads

JVM: Oracle Corporation OpenJDK 64-Bit Server VM 24.51-b03
  on Linux 2.6.18-308.11.1.el5 amd64
"""

Notice "-1124766.43k used"



Server has 24GB total memory.

Relevant sections of gerrit.config:
[database]
		type = postgresql
[index]
		type = LUCENE
[auth]
		type = LDAP
[container]
		javaHome = /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55.x86_64/jre
		heapLimit = 12g
[core]
		packedGitOpenFiles = 4096
		packedGitLimit = 6g
		packedGitWindowSize = 16k
		deltaBaseCacheLimit = 50m
		streamFileThreshold = 2047m