[SERVER-27919] when too many connections to mongod server, too much heap memory free and keep in physical memory which don't be released Created: 06/Feb/17 Updated: 10/Oct/17 Resolved: 07/Feb/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | 3.2.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | shawn | Assignee: | Mark Agarunov |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
config: how to find this question:
connecto to mongod , seeing from serverStatus:
but, pageheap_free_bytes not be released. Once the connecitons increases, the memory use increases too. monitor data from my data collector:
|
| Comments |
| Comment by Mark Agarunov [ 07/Feb/17 ] |
|
Hello shawn001, Thank you for providing the diagnostic data. Looking over this, it seems that the behavior you're describing is due to the kernel's memory model. In the following screenshot: At point A the memory is allocated for an operation, immediately after, once the operation has completed and the memory is no longer needed, the majority of that allocated memory is considered free, as can be seen in the pageheap_free_bytes in the above screenshot. However, as you note it is still considered as memory used by the monogod process. This is due to how the kernel allocates memory. Even if the memory is freed, the kernel will hold it allocated in case it is used again, to skip having to reallocate that memory, unless there is memory pressure. That is, until something else requests the memory, the kernel will generally keep the memory "used". Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group. Thanks, |
| Comment by shawn [ 07/Feb/17 ] |
|
@Thomas Schubert my diagnostic.data as follows. thanks. |
| Comment by Kelsey Schubert [ 06/Feb/17 ] |
|
Hi shawn001, Thanks for reporting this behavior. So we can investigate, would you please attach an archive of the diagnostic.data directory for the affected mongod? Regards, |
| Comment by shawn [ 06/Feb/17 ] |
|
os version: CentOS release 6.5 (Final) |