Comments (7)
On Wed, Jun 20, 2012 at 2:02 PM, Gilles Chehade
[email protected]
wrote:
Statistics are handled by static structures stored on shared pages.
I would like to have the stats API use a backend system (akin to maps, scheduler, delivery, queue, ..) and provide a default backend that would store statistics in a tree.
The API needs to be redesigned slightly, but the idea is to have very simple primitives: increment / decrement / set / get ; and allow setting dynamic keys which is not possible today:
/* example */
{
char key[STATS_KEY_SIZE];snprintf(key, sizeof key, "deliveries.%s", evp->dest.domain);
stats_increment(key);
}
The problem is that it will not work with shared pages easily anymore.
I can very well see what you intend to do, with SQL backend, but
what do you have in mind as a default out-of-the-box backend?
Eric.
from opensmtpd.
Well the goal is to get rid of shared pages and have the control process keep track of statistics.
To all processes, the stats_increment() [and related] functions will be imsg calls to the control process.
from opensmtpd.
On Wed, Jun 20, 2012 at 2:34 PM, Gilles Chehade
[email protected]
wrote:
Well the goal is to get rid of shared pages and have the control process keep track of statistics.
To all processes, the stats_increment() [and related] functions will be imsg calls to the control process.
That works well as long as your are just "pushing" stat counters, but as
soon as you want to query a stat counter, things get more complicated,
as you have to remain async. Unless you want to use a specific sync channel
for stats.
Eric.
from opensmtpd.
Nope, no sync channel.
If I'm correct, the only reason why we share statistics and where a process pops stats from another process is for runner to see if mda / mta will run into a fd exhaustion if we send them a batch.
In practice, every process should only care about its very own statistics and the new getdtablecount() system call can avoid us having to do this trick:
- every process maintains its OWN set of stats and pushes them to control via imsg
- every time mda / mta open a file, they use the getdtablecount() call to determine if they are below a limit
- if the limit is reached, they send an imsg to runner to notify it that they are too busy
- when they are below limit, they notify imsg that they are ok
with this scenario, statistics need only pushing
from opensmtpd.
On Wed, Jun 20, 2012 at 3:00 PM, Gilles Chehade
[email protected]
wrote:
Nope, no sync channel.
If I'm correct, the only reason why we share statistics and where a process pops stats from another process is for runner to see if mda / mta will run into a fd exhaustion if we send them a batch.
In practice, every process should only care about its very own statistics and the new getdtablecount() system call can avoid us having to do this trick:
- every process maintains its OWN set of stats and pushes them to control via imsg
- every time mda / mta open a file, they use the getdtablecount() call to determine if they are below a limit
- if the limit is reached, they send an imsg to runner to notify it that they are too busy
- when they are below limit, they notify imsg that they are ok
with this scenario, statistics need only pushing
Ok, this makes sense.
Eric.
from opensmtpd.
branch 'stats' @ poolp has initial stab at this ;-)
from opensmtpd.
It's in.
from opensmtpd.
Related Issues (20)
- Mail not sent from root HOT 2
- opensmtpd.org is down (returns 404s) HOT 7
- CHANGES.md is outdated HOT 1
- gid/uid from userinfo ignored in v7.3.0 vs v6.8.0. HOT 3
- tm_year is unitialized, STARTTLS IO error null, fallback to plain, depends on arch HOT 5
- 7.4.0p0: man pages are installed in wrong location HOT 17
- build errors on macOS 14.2 HOT 9
- segfault when compiled without libbsd HOT 5
- `--with-mantype` is broken
- Silent Discard Mails HOT 1
- smtp disconnected reason="io-error: error:0A080006:SSL routines::EVP lib" HOT 3
- Writing filters in C HOT 8
- Duplication of email when it contains the same address inside `To`, `Cc` and `Bcc`
- Misinterpretation of escaped quotation marks in To/From/Cc HOT 4
- protocols "legacy", ciphers "compat" no longer seem to work for older mail clients HOT 2
- ssl-handshake takes forever running opensmtpd on top of docker
- Build fails on macos 10.5.8: `error: ‘EAI_OVERFLOW’ undeclared` HOT 9
- Listen tls, smtps and port with multiple domains HOT 1
- implicit declaration of function snprintf in openbsd-compat/getdtablecount.c HOT 2
- How to add additional recipient / dual delivery? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensmtpd.