# Warning on console - approaching the limit on PV entries



## chavez243ca (Apr 10, 2010)

Just noticed this morning my console has numerous warnings:

"Approaching the limit on PV entries..." and it advises increasing vm.pmap.shpgperproc and/or vm.pmap.pv_entry_max

googling that error, I found some others have suggested setting kern.ipc.shm_use_phys to 1

I'd prefer not to make any changes without first understanding what those changes do and perhaps why I'm getting this warning in the first place.

system is a quad Xeon, 2GB RAM, FBSD 7.2-p4 i386, running quite a few processes, but not very heavily loaded.

running apache, php, perl, assp, mysql, squid, havp, nagios, clamav...


```
last pid: 41792;  load averages:  0.00,  0.01,  0.00                up 122+12:33:01 10:14:41
184 processes: 1 running, 183 sleeping
CPU:  0.1% user,  0.0% nice,  0.0% system,  0.8% interrupt, 99.2% idle
Mem: 716M Active, 867M Inact, 241M Wired, 39M Cache, 112M Buf, 131M Free
Swap: 2005M Total, 316K Used, 2005M Free
```

thoughts?


----------



## rbelk (Apr 21, 2010)

Chavez243ca, check out this thread it might help. Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entry_max sysctl.


----------



## chrcol (Nov 26, 2010)

that thread you linked to didnt really get anywhere, the first conclusion I have come to is that the default is way too low, I also have never seen this problem in FreeBSD until 7.x and later.

The default limit is 200 (vm.pmap.shpgperproc), I am seeing the warning on servers with the limit set to 800 (quadrupled), and now have just set some servers to 2000 (10x the default), I dont know if there is a downside to having this set higher.  The default limit gets hit even on test servers where they get less than a dozen hits per day.  All the servers with the issue host apache and php.


----------

