{"action":"created","issue":{"url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/97","labels_url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/97/comments","events_url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/97/events","html_url":"https://github.com/grobian/carbon-c-relay/issues/97","id":103348316,"number":97,"title":"Give threads a name to allow pinpointing chokepoints","user":{"login":"rtoma","id":2914051,"avatar_url":"https://avatars.githubusercontent.com/u/2914051?v=3","gravatar_id":"","url":"https://api.github.com/users/rtoma","html_url":"https://github.com/rtoma","followers_url":"https://api.github.com/users/rtoma/followers","following_url":"https://api.github.com/users/rtoma/following{/other_user}","gists_url":"https://api.github.com/users/rtoma/gists{/gist_id}","starred_url":"https://api.github.com/users/rtoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtoma/subscriptions","organizations_url":"https://api.github.com/users/rtoma/orgs","repos_url":"https://api.github.com/users/rtoma/repos","events_url":"https://api.github.com/users/rtoma/events{/privacy}","received_events_url":"https://api.github.com/users/rtoma/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-26T19:37:54Z","updated_at":"2015-08-27T07:11:41Z","closed_at":"2015-08-27T07:11:41Z","body":"With ```top -p <pid> -H``` one can see all threads of a process.\r\n\r\nExample output for me:\r\n```\r\ntop - 21:33:44 up 54 days,  4:43,  1 user,  load average: 1.46, 1.33, 1.19\r\nTasks:  20 total,   0 running,  20 sleeping,   0 stopped,   0 zombie\r\nCpu(s):  0.9%us,  0.7%sy,  0.0%ni, 98.4%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st\r\nMem:  132119240k total, 128266424k used,  3852816k free,  1389176k buffers\r\nSwap: 16777212k total,    33692k used, 16743520k free, 119320964k cached\r\n\r\n  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND\r\n28123 carbon-c  20   0  546m  26m  988 S  0.7  0.0   0:01.82 carbon-c-relay\r\n28109 carbon-c  20   0  546m  26m  988 S  0.3  0.0   0:00.51 carbon-c-relay\r\n28110 carbon-c  20   0  546m  26m  988 S  0.3  0.0   0:00.51 carbon-c-relay\r\n28113 carbon-c  20   0  546m  26m  988 S  0.3  0.0   0:00.45 carbon-c-relay\r\n28117 carbon-c  20   0  546m  26m  988 S  0.3  0.0   0:00.46 carbon-c-relay\r\n28120 carbon-c  20   0  546m  26m  988 S  0.3  0.0   0:00.48 carbon-c-relay\r\n28122 carbon-c  20   0  546m  26m  988 S  0.3  0.0   0:01.79 carbon-c-relay\r\n28108 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.08 carbon-c-relay\r\n28111 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.54 carbon-c-relay\r\n28112 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.52 carbon-c-relay\r\n28114 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.43 carbon-c-relay\r\n28115 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.42 carbon-c-relay\r\n28116 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.43 carbon-c-relay\r\n28118 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.45 carbon-c-relay\r\n28119 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.46 carbon-c-relay\r\n28121 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.40 carbon-c-relay\r\n28124 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:01.99 carbon-c-relay\r\n28125 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:01.97 carbon-c-relay\r\n28126 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.22 carbon-c-relay\r\n28127 carbon-c  20   0  546m  26m  988 S  0.0  0.0   0:00.08 carbon-c-relay\r\n```\r\n\r\nWouldn't it be cool to name the threads with their task (collector, dispatcher, ...) so you can see which are busiest and maybe causing trouble?\r\n\r\nBest I could find for C is how redis does it: http://download.redis.io/redis-stable/src/setproctitle.c"},"comment":{"url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/comments/135317263","html_url":"https://github.com/grobian/carbon-c-relay/issues/97#issuecomment-135317263","issue_url":"https://api.github.com/repos/grobian/carbon-c-relay/issues/97","id":135317263,"user":{"login":"rtoma","id":2914051,"avatar_url":"https://avatars.githubusercontent.com/u/2914051?v=3","gravatar_id":"","url":"https://api.github.com/users/rtoma","html_url":"https://github.com/rtoma","followers_url":"https://api.github.com/users/rtoma/followers","following_url":"https://api.github.com/users/rtoma/following{/other_user}","gists_url":"https://api.github.com/users/rtoma/gists{/gist_id}","starred_url":"https://api.github.com/users/rtoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtoma/subscriptions","organizations_url":"https://api.github.com/users/rtoma/orgs","repos_url":"https://api.github.com/users/rtoma/repos","events_url":"https://api.github.com/users/rtoma/events{/privacy}","received_events_url":"https://api.github.com/users/rtoma/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T07:11:41Z","updated_at":"2015-08-27T07:11:41Z","body":"No resource problem yet. I'll close this one.\r\n\r\nI am using carbon-c-relay in a 2-node cluster. All metrics replicated between them on 3.2tb fusionio. I hope this cluster will be able to handle 40-45k datapoints/sec input. The python daemons have already proven incapable.\r\n"}}