Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus occupy too much virtual memory? #5295

Closed
communityexplorer opened this Issue Mar 3, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@communityexplorer
Copy link

communityexplorer commented Mar 3, 2019

Bug Report

Why prometheus occupy so much virtual memory?
Here is the result of top cmd, as it show, the virtual memory is over 37.4g, while the physical memory
is just 2.6g, is this a problem?
As we know, ulimit -v cmd can set the upper limit of the virtual memory that process can use , so what value should we set?

PR_Prometheus_Server:~ # top
top - 08:18:47 up 14 days, 23:52, 3 users, load average: 1.00, 0.97, 1.22
Tasks: 176 total, 2 running, 174 sleeping, 0 stopped, 0 zombie
Cpu(s): 40.2%us, 0.1%sy, 0.0%ni, 59.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 31727M total, 28730M used, 2997M free, 90M buffers
Swap: 16385M total, 0M used, 16385M free, 25765M cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12444 monitoru 20 0 37.4g 2.6g 194m S 643 8.3 61:03.76 prometheus
10292 root 20 0 4004 484 392 S 1 0.0 76:25.49 guard-userspace
1 root 20 0 10560 884 752 S 0 0.0 0:08.94 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0 0.0 0:03.61 ksoftirqd/0
4 root 20 0 0 0 0 S 0 0.0 0:33.36 kworker/0:0

Environment

  • System information:

    Linux 3.0.101-0.47.71-default #1 SMP Thu Nov 12 12:22:22 UTC 2015 (b5b212e) x86_64 
    
  • Prometheus version:

    version="(version=2.5.0, branch=HEAD, revision=67dc912ac8b24f94a1fc478f352d25179c94ab9b)"
    build_context="(go=go1.11.1, user=root@578ab108d0b9, date=20181106-11:40:44)"

  • Prometheus configuration file:
    runtime flags
    - '--storage.tsdb.path=/data'
    - '--storage.tsdb.retention=90d'
    - '--web.enable-lifecycle'

@anumercian

This comment has been minimized.

Copy link

anumercian commented Mar 4, 2019

I am facing a similar issue where Prometheus is taking too much OS memory. While /pprof/heap shows only 120MB used, the OS shows 450MB used.

@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Mar 5, 2019

A high value for the virtual memory isn't a problem usually as the operating system should reclaim it whenever it is needed.

I'm closing it for now. If you have further questions, please use our user mailing list, which you can also search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.