question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ray.init: can't find 'total memory' in 'vmstat' output

See original GitHub issue

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
  • Ray installed from (source or binary): binary
  • Ray version: 0.6.0
  • Python version: 3.7
  • Exact command to reproduce: ray.init()

Describe the problem

When calling the above function, the program exits with ValueError: Can't find b'total memory' in 'vmstat' output.

Source code / logs

Traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/temp/schock/conda/envs/delira/lib/python3.7/site-packages/ray/worker.py", line 1727, in init
    _internal_config=_internal_config)
  File "/home/temp/schock/conda/envs/delira/lib/python3.7/site-packages/ray/worker.py", line 1489, in _init
    _internal_config=_internal_config)
  File "/home/temp/schock/conda/envs/delira/lib/python3.7/site-packages/ray/services.py", line 1730, in start_ray_head
    _internal_config=_internal_config)
  File "/home/temp/schock/conda/envs/delira/lib/python3.7/site-packages/ray/services.py", line 1475, in start_ray_processes
    redis_password=redis_password)
  File "/home/temp/schock/conda/envs/delira/lib/python3.7/site-packages/ray/services.py", line 1108, in start_plasma_store
    object_store_memory, plasma_directory, huge_pages)
  File "/home/temp/schock/conda/envs/delira/lib/python3.7/site-packages/ray/services.py", line 1017, in determine_plasma_store_config
    system_memory = ray.utils.get_system_memory()
  File "/home/temp/schock/conda/envs/delira/lib/python3.7/site-packages/ray/utils.py", line 321, in get_system_memory
    return vmstat("total memory") * bytes_in_kilobyte
  File "/home/temp/schock/conda/envs/delira/lib/python3.7/site-packages/ray/utils.py", line 282, in vmstat
    raise ValueError("Can't find {} in 'vmstat' output.".format(stat))

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
robertnishiharacommented, Jan 4, 2019

Can you share the output of running vmstat -s from the command line?

As a quick workaround, you can install psutil, e.g., pip install psutil or conda install psutil. Ray falls back to using vmstat to determine how much memory is available only when psutil is not installed.

You might also try ray==0.6.1 although I don’t think that will change it.

0reactions
richardliawcommented, Jan 30, 2019

OK, closing for now - feel free to reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Memory usage determination with the vmstat command - IBM
The vmstat command summarizes the total active virtual memory used by all of the processes in the system, as well as the number...
Read more >
How can I find out the total physical memory (RAM) of my linux ...
One more useful command: vmstat -s | grep memory sample output on my machine is: 2050060 K total memory 1092992 K used memory...
Read more >
Linux commands: exploring virtual memory with vmstat
You see information around processes, memory, swap, IO, system, and CPU. The man page for the command states the following ( man vmstat...
Read more >
How to get % memory usage with vmstat? - Server Fault
So ideally, what I want to achieve from 'vmstat' is the % memory usage, as in: <used_memory>/<total_memory> * 100%. Thanks!
Read more >
The Art and Science of AIX Performance -- Part II - LinkedIn
A config.sum's initial output is much like a prtconf. It displays your system's name, AIX version and serial number (see Figure 1 below)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found