Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more internal metrics #163

Closed
4 tasks done
An-DJ opened this issue Aug 6, 2021 · 6 comments
Closed
4 tasks done

Add more internal metrics #163

An-DJ opened this issue Aug 6, 2021 · 6 comments
Assignees
Labels
feature New feature

Comments

@An-DJ
Copy link
Contributor

An-DJ commented Aug 6, 2021

Is your feature request related to a problem? Please describe.
The pgagroal lacks some metrics of internal resource state, such as network traffic and so on.

Describe the solution you'd like
This feature includes new metrics as follows:

  • pgagroal_network_sent which characterizes the network traffic sent
  • pgagroal_network_received which characterizes the network traffic received
  • pgagroal_client_sockets which characterizes the number of sockets client used
  • pgagroal_self_sockets which characterizes the number of sockets pgagroal used itself
@An-DJ An-DJ added the feature New feature label Aug 6, 2021
An-DJ added a commit to An-DJ/pgagroal that referenced this issue Aug 6, 2021
Add the following metrics:
* pgagroal_sent
* pgagroal_received
An-DJ added a commit to An-DJ/pgagroal that referenced this issue Aug 7, 2021
Add the following metrics:
* pgagroal_sent
* pgagroal_received
An-DJ added a commit to An-DJ/pgagroal that referenced this issue Aug 7, 2021
Add the following metrics:
* pgagroal_sent
* pgagroal_received
An-DJ added a commit to An-DJ/pgagroal that referenced this issue Aug 7, 2021
Add the following metrics:
* pgagroal_network_sent
* pgagroal_network_received
An-DJ added a commit to An-DJ/pgagroal that referenced this issue Aug 8, 2021
Add the following metrics:
* pgagroal_client_sockets
* pgagroal_self_sockets
@An-DJ
Copy link
Contributor Author

An-DJ commented Aug 8, 2021

@jesperpedersen I have pushed a new commit which contains the implementation of pgagroal_client_sockets and pgagroal_self_sockets.

I am considering whether to remove metric pgagroal_server_sockets, since it is always equal to the total number of connections. Could you give me some advice?

@jesperpedersen
Copy link
Collaborator

pgagroal_client_sockets is the important one. pgagroal_self_sockets should stay more or less constant.

For pgagroal_server_sockets I would just use the existing metrics for connections, and display that as server - e.g. not a new metric.

An-DJ added a commit to An-DJ/pgagroal that referenced this issue Aug 9, 2021
Add the following metrics:
* pgagroal_client_sockets
* pgagroal_self_sockets
@An-DJ
Copy link
Contributor Author

An-DJ commented Aug 9, 2021

pgagroal_client_sockets is the important one. pgagroal_self_sockets should stay more or less constant.

For pgagroal_server_sockets I would just use the existing metrics for connections, and display that as server - e.g. not a new metric.

Server sockets has been added into dashboard in new commit in #165. PTAL~ @jesperpedersen

@An-DJ
Copy link
Contributor Author

An-DJ commented Aug 9, 2021

@jesperpedersen Besides, I notice that the main memory size is fixed by configuration file like shared memory created by mmap and so on. I have no idea whether pgagroal_mem_alloc should be added into pgagroal.

Could you give me some Suggestions?

@jesperpedersen
Copy link
Collaborator

There is a very minimal allocation rate which happens during startup of a connection, or with the client.

The pipeline uses a fixed buffer for communication so that doesn't change.

As such I don't think we need a metric for allocations, and there is no portable system function for checking memory usage.

@An-DJ
Copy link
Contributor Author

An-DJ commented Aug 9, 2021

There is a very minimal allocation rate which happens during startup of a connection, or with the client.

The pipeline uses a fixed buffer for communication so that doesn't change.

As such I don't think we need a metric for allocations, and there is no portable system function for checking memory usage.

I think so, too. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants