mesosphere-backup / mesos-cli

This project has been deprecated. Please use the DC/OS CLI.

Home Page:https://github.com/mesosphere/dcos-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mesos-ps very slow

samek opened this issue · comments

Hi,

When running mesos ps it takes more than a minute to run. Is this normal ?

I have only 44 tasks currently running on 13 slaves.

I tried setting loglevel to info "mesos config log_level info" and what I can see that same host is requested more up to 40 times.

----- snip ----
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 10.0.0.74
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 10.0.0.74
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 10.0.0.74
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 10.0.0.74
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 10.0.0.74
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 10.0.0.74

........

all other commands seam fast. (find, events .. etc).

@samek, is that host running your master node? We connect to each node directly to get a list of running tasks.

Note that we're merging this CLI with the DCOS CLI very shortly - but the code is largely common, so we'll try and replicate the issue there.

Which host is 10.0.0.74? master? slave?

That's a slave.

I've sorted and counted how many requests are made for a singe ps.
Currently 10.0.0.137 is master. Rest are slaves. (mesos slave is not running on masters - we have 3)

  9  10.0.0.137
  6  10.0.0.139
  9  10.0.0.140
 14  10.0.0.191
  8  10.0.0.194
  8  10.0.0.200
  2  10.0.0.201
  4  10.0.0.202
  4  10.0.0.236
  2  10.0.0.26
  4  10.0.0.30
  4  10.0.0.32
 43  10.0.0.74

Thanks for the information @samek. Have you signed up for the DCOS Early Access program? I'd be curious to see if you see the same behaviour using dcos tasks (this provides the same functionality as mesos ps).

I have DCOS EAP.
So I should try using dcos tasks on my current cluster (which is not using DCOS) ?

You'll need to make sure you have version 0.1.6 of the CLI. If you've installed the CLI from an earlier EAP, you might not have the latest version.

By default it assumes you're running DCOS, but it can talk to raw mesos if you run dcos config set core.mesos_master_url = http://10.0.0.137/ (or whatever your master url is). Then dcos tasks should work.

Heh. dcos tasks returns it in 1sek

dcos tasks

real 0m1.067s
user 0m0.461s
sys 0m0.116s

mesos ps

real 1m4.105s
user 0m0.976s
sys 0m0.109s

Excellent. We're in the process of porting the other functionality over slowly. I'm closing this ticket for now!

s/slowly/quickly :)