#20 Write stats collecting mechanism

已关闭
yannweb4 年前创建 · 2 条评论
yannweb 评论于 4 年前

Nedd #24

Find a way to collect stats in pool_handling process.

The collection mechanism should give access to UDP server ( see #19 ) to following data :

  • worker count
  • requests count last 10/5/1 minute
  • request time average (maybe ?) => slow IPC between worker & pool ?
  • total request counter (maybe ?) => will overflow ?!
  • idle/busy state (maybe ?) => change too fast ?
  • idle/busy ratio or workload (maybe ?)

We have to take care of not slowing down the workers with this component…

Maybe the collection child could help implementing this mechanism ?

__Nedd #24__ Find a way to collect stats in pool_handling process. The collection mechanism should give access to UDP server ( see #19 ) to following data : - worker count - requests count last 10/5/1 minute - request time average (maybe ?) => slow IPC between worker & pool ? - total request counter (maybe ?) => will overflow ?! - idle/busy state (maybe ?) => change too fast ? - idle/busy ratio or workload (maybe ?) We have to take care of not slowing down the workers with this component... Maybe the collection child could help implementing this mechanism ?
yannweb 4 年前 添加了里程碑 BETA version
yannweb 添加了标签
enhancement
4 年前
yannweb 添加了标签
_core
4 年前
yannweb 评论于 4 年前
所有者

A solution to a fast request counter implementation can use semaphores :

When a worker starts handling a request it increment a sempahore. Meanwhile, a counter process (pool_handler or stats collection child) will attempt to decrease (fast enough) the semaphore with WNOHANG.

If the decrement semop do not fail, a counter can be incremented.

Note : the 10/5/1 min counters implies to store all requests timestamps ?? Maybe we can associate a timestamp with a request count ?

=> if 100 req/s stores {time(NULL), 100} and not time_t [100] = {time(NULL), time(NULL), etc.}

A solution to a fast request counter implementation can use semaphores : When a worker starts handling a request it increment a sempahore. Meanwhile, a counter process (pool_handler or stats collection child) will attempt to decrease (fast enough) the semaphore with WNOHANG. If the decrement semop do not fail, a counter can be incremented. Note : the 10/5/1 min counters implies to store all requests timestamps ?? Maybe we can associate a timestamp with a request count ? <code>=> if 100 req/s stores {time(NULL), 100} and not time_t [100] = {time(NULL), time(NULL), etc.}</code>
yannweb 开始工作 4 年前
yannweb 停止工作 4 年前
54min 36s
yannweb 开始工作 4 年前
yannweb 停止工作 4 年前
3h 12min
yannweb4 年前 指派给自己
yannweb 添加耗时 4 年前
1h
"yannweb 添加了新的依赖项 4 年前"
yannweb 开始工作 4 年前
yannweb 停止工作 4 年前
31min 16s
yannweb 评论于 4 年前
所有者

closed by b3af92459e

closed by b3af92459e
yannweb4 年前 关闭
登陆 并参与到对话中。
正在加载...
取消
保存
这个人很懒,什么都没留下。