Title: Aggregate expired pid db files, control the number of files and improve scrape effectiveness · Issue #443 · prometheus/client_python · GitHub
Open Graph Title: Aggregate expired pid db files, control the number of files and improve scrape effectiveness · Issue #443 · prometheus/client_python
X Title: Aggregate expired pid db files, control the number of files and improve scrape effectiveness · Issue #443 · prometheus/client_python
Description: history related issues: #441 #430 Can we aggregate all the db files from a period of time ago and non-current pid into a total db file, to control the number of pid files ? I have realized this idea with golang,here are some details: Pro...
Open Graph Description: history related issues: #441 #430 Can we aggregate all the db files from a period of time ago and non-current pid into a total db file, to control the number of pid files ? I have realized this ide...
X Description: history related issues: #441 #430 Can we aggregate all the db files from a period of time ago and non-current pid into a total db file, to control the number of pid files ? I have realized this ide...
Opengraph URL: https://github.com/prometheus/client_python/issues/443
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Aggregate expired pid db files, control the number of files and improve scrape effectiveness","articleBody":"history related issues: https://github.com/prometheus/client_python/pull/441 \r\n https://github.com/prometheus/client_python/pull/430\r\n\r\nCan we aggregate all the db files from a period of time ago and non-current pid into a total db file, to control the number of pid files ?\r\n\r\nI have realized this idea with golang,here are some details:\r\n\r\n**Project deploy info: \r\ngunicorn django \r\n128 workers \r\ngunicorn max_requests:10000(create a new pid file almost every minute)**\r\n\r\n\r\n1. I can't solve the problem that the pid file has been growing, and it can reach 6,000 in four days;\r\n2. Try to delete the expired pid regularly in the code, but it will cause the figure to drop with grafana;\r\n3. The time to request metric is getting longer as the program runs.\r\n\r\n\r\nImprove scrape efficiency:\r\nI used golang to rewrite the logic of python aggregate metrics(generate metric still using python). After rewriting, each scrape time is less than 1 second. \r\n\r\nSolve the growing pid files:\r\nAggregate all the db files from a period of time ago and non-current pid into a total db file. Then delete these files. When calculating metric, history total db + curent pid = current pid db. (i do it every hour)\r\n\r\nNow, num of pid files is \u003c200 in my project. if we can do change this, it would be a big strengthen. Just like prometheus will also aggregate historical data","author":{"url":"https://github.com/cai-personal","@type":"Person","name":"cai-personal"},"datePublished":"2019-07-26T05:23:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/443/client_python/issues/443"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:46d6816d-c811-fa7c-0a79-4a147264ecfa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EAAA:6EBCD:FEA90E:148777F:698FD3F5 |
| html-safe-nonce | 7926328297414de71c5862aa6001b81ba94c05d45c2c03d067671c14a82cb856 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUFBOjZFQkNEOkZFQTkwRToxNDg3NzdGOjY5OEZEM0Y1IiwidmlzaXRvcl9pZCI6IjE2MDQ2ODI4OTExNzM4MTExODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 84e915e9bbd841d1b1adbc7aa6b3309f4691c8e6a8dba631b4331b9d8507fe8e |
| hovercard-subject-tag | issue:473182380 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/prometheus/client_python/443/issue_layout |
| twitter:image | https://opengraph.githubassets.com/04494e57f5321c41089c77ff701548164b6373f7ea57c7e7840ef4e8deeb18a8/prometheus/client_python/issues/443 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/04494e57f5321c41089c77ff701548164b6373f7ea57c7e7840ef4e8deeb18a8/prometheus/client_python/issues/443 |
| og:image:alt | history related issues: #441 #430 Can we aggregate all the db files from a period of time ago and non-current pid into a total db file, to control the number of pid files ? I have realized this ide... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cai-personal |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/prometheus/client_python git https://github.com/prometheus/client_python.git |
| octolytics-dimension-user_id | 3380462 |
| octolytics-dimension-user_login | prometheus |
| octolytics-dimension-repository_id | 30618733 |
| octolytics-dimension-repository_nwo | prometheus/client_python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 30618733 |
| octolytics-dimension-repository_network_root_nwo | prometheus/client_python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d320682233dfd4d28c0b30554a564c2fcd229032 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width