{"action":"created","issue":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/4979","labels_url":"https://api.github.com/repos/influxdb/influxdb/issues/4979/labels{/name}","comments_url":"https://api.github.com/repos/influxdb/influxdb/issues/4979/comments","events_url":"https://api.github.com/repos/influxdb/influxdb/issues/4979/events","html_url":"https://github.com/influxdb/influxdb/issues/4979","id":120276591,"number":4979,"title":"[0.9.5] query performance","user":{"login":"esecules","id":5402229,"avatar_url":"https://avatars.githubusercontent.com/u/5402229?v=3","gravatar_id":"","url":"https://api.github.com/users/esecules","html_url":"https://github.com/esecules","followers_url":"https://api.github.com/users/esecules/followers","following_url":"https://api.github.com/users/esecules/following{/other_user}","gists_url":"https://api.github.com/users/esecules/gists{/gist_id}","starred_url":"https://api.github.com/users/esecules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esecules/subscriptions","organizations_url":"https://api.github.com/users/esecules/orgs","repos_url":"https://api.github.com/users/esecules/repos","events_url":"https://api.github.com/users/esecules/events{/privacy}","received_events_url":"https://api.github.com/users/esecules/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/influxdb/influxdb/labels/category/performance","name":"category/performance","color":"006b75"},{"url":"https://api.github.com/repos/influxdb/influxdb/labels/category/queries","name":"category/queries","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-03T21:42:37Z","updated_at":"2015-12-14T16:34:48Z","closed_at":null,"body":"I just upgraded from 0.9.3 and I am seeing very high query latency (> 10s) on queries that used to take less than 1 second. Under a load of purely writes the system is much happier.  \r\n\r\nFor example, in my setup I have a wrapper around each write operation that counts how long the write took and enters that as a point as  \"value\". The only tag is the serial number of the source of the wrapped data. This hasn't given me problems with having too many series in the past. \r\n\r\nmy query is \r\n```\r\nSELECT mean(\"value\") FROM \"influx.latency.write\" WHERE time > now() - 6h GROUP BY time(1m)\r\n``` \r\n\r\nheres my config file too:\r\n```\r\nreporting-disabled = true\r\n[[udp]]\r\nenabled = false\r\n[[graphite]]\r\nenabled = false\r\n[http]\r\nhttps-certificate = \"/etc/ssl/influxdb.pem\"\r\nhttps-enabled = false\r\npprof-enabled = false\r\nenabled = true\r\nbind-address = \":8086\"\r\nwrite-tracing = false\r\nlog-enabled = true\r\nauth-enabled = false\r\n[monitor]\r\nstore-interval = \"10s\"\r\nstore-enabled = true\r\nstore-database = \"_internal\"\r\n[hinted-handoff]\r\nretry-rate-limit = 0\r\nenabled = true\r\nmax-age = \"168h\"\r\nmax-size = 1073741824\r\ndir = \"/srv/hh\"\r\npurge-interval = \"1h\"\r\nretry-interval = \"1s\"\r\nretry-max-interval = \"1m\"\r\n[admin]\r\nhttps-certificate = \"/etc/ssl/influxdb.pem\"\r\nhttps-enabled = false\r\nenabled = true\r\nbind-address = \":8083\"\r\n[collectd]\r\nenabled = false\r\n[cluster]\r\nshard-writer-timeout = \"10s\"\r\nwrite-timeout = \"5s\"\r\n[meta]\r\nelection-timeout = \"1s\"\r\nleader-lease-timeout = \"500ms\"\r\nhostname = \"localhost\"\r\nbind-address = \":8088\"\r\nheartbeat-timeout = \"1s\"\r\ncluster-tracing = false\r\nretention-autocreate = true\r\ncommit-timeout = \"50ms\"\r\ndir = \"/srv/meta\"\r\nraft-promotion-enabled = true\r\n[opentsdb]\r\nenabled = false\r\n[shard-precreation]\r\ncheck-interval = \"10m\"\r\nadvance-period = \"30m\"\r\nenabled = true\r\n[data]\r\nwal-enable-logging = true\r\nwal-dir = \"/var/lib/influxdb/wal\"\r\nmax-wal-size = 104857600\r\nwal-flush-interval = \"10m\"\r\ndir = \"/srv/db\"\r\nwal-partition-flush-delay = \"2s\"\r\n[continuous_queries]\r\nrecompute-previous-n = 2\r\nenabled = true\r\ncompute-runs-per-interval = 10\r\ncompute-no-more-than = \"2m\"\r\nlog-enabled = true\r\nrecompute-no-older-than = \"10m\"\r\n[retention]\r\ncheck-interval = \"30m\"\r\nenabled = true\r\n```"},"comment":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/comments/164487387","html_url":"https://github.com/influxdb/influxdb/issues/4979#issuecomment-164487387","issue_url":"https://api.github.com/repos/influxdb/influxdb/issues/4979","id":164487387,"user":{"login":"zstyblik","id":6183869,"avatar_url":"https://avatars.githubusercontent.com/u/6183869?v=3","gravatar_id":"","url":"https://api.github.com/users/zstyblik","html_url":"https://github.com/zstyblik","followers_url":"https://api.github.com/users/zstyblik/followers","following_url":"https://api.github.com/users/zstyblik/following{/other_user}","gists_url":"https://api.github.com/users/zstyblik/gists{/gist_id}","starred_url":"https://api.github.com/users/zstyblik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zstyblik/subscriptions","organizations_url":"https://api.github.com/users/zstyblik/orgs","repos_url":"https://api.github.com/users/zstyblik/repos","events_url":"https://api.github.com/users/zstyblik/events{/privacy}","received_events_url":"https://api.github.com/users/zstyblik/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T16:34:48Z","updated_at":"2015-12-14T16:34:48Z","body":"Hello,\r\n\r\nI'm possibly seeing the same issue with 0.9.6.1 and TSM1.\r\n\r\n> SELECT mean(value) FROM telegraf.\"default\".disk_inodes_free WHERE host = 'builder' AND time > 402767h AND time < now() GROUP BY time(1m);\r\n\r\ntakes about 2.1minutes to return.\r\n\r\n> SELECT count(value) FROM telegraf.\"default\".disk_inodes_free WHERE host = 'builder' AND time > 402767h AND time < now();\r\n\r\nyields 419253. This is instantaneous. When `GROUP BY time(1m)` is added, whether it makes sense or not, it takes ~ 2+ minutes to finish as in previous case.\r\n\r\nInfluxDB is running in Docker container in/at VM with 4 CPU cores and 6GB RAM. top shows CPU@200%, RAM ~ 12%."}}