mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-27 13:28:32 +00:00
[OPTIM] counters: move some max numbers to the counters struct
There are a few remaining max values that need to move to counters. Also, the counters are more often used than some config information, so get them closer to the other useful struct members for better cache efficiency.
This commit is contained in:
parent
53fb4ae261
commit
ac68c5d92c
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
include/proto/proxy.h
|
* include/proto/proxy.h
|
||||||
This file defines function prototypes for proxy management.
|
* This file defines function prototypes for proxy management.
|
||||||
|
*
|
||||||
Copyright (C) 2000-2008 Willy Tarreau - w@1wt.eu
|
* Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
|
||||||
|
*
|
||||||
This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
License as published by the Free Software Foundation, version 2.1
|
* License as published by the Free Software Foundation, version 2.1
|
||||||
exclusively.
|
* exclusively.
|
||||||
|
*
|
||||||
This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PROTO_PROXY_H
|
#ifndef _PROTO_PROXY_H
|
||||||
#define _PROTO_PROXY_H
|
#define _PROTO_PROXY_H
|
||||||
@ -73,8 +73,8 @@ static void inline proxy_inc_fe_ctr(struct listener *l, struct proxy *fe)
|
|||||||
l->counters->cum_conn++;
|
l->counters->cum_conn++;
|
||||||
|
|
||||||
update_freq_ctr(&fe->fe_sess_per_sec, 1);
|
update_freq_ctr(&fe->fe_sess_per_sec, 1);
|
||||||
if (fe->fe_sess_per_sec.curr_ctr > fe->fe_sps_max)
|
if (fe->fe_sess_per_sec.curr_ctr > fe->counters.fe_sps_max)
|
||||||
fe->fe_sps_max = fe->fe_sess_per_sec.curr_ctr;
|
fe->counters.fe_sps_max = fe->fe_sess_per_sec.curr_ctr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* increase the number of cumulated connections on the designated backend */
|
/* increase the number of cumulated connections on the designated backend */
|
||||||
@ -82,8 +82,8 @@ static void inline proxy_inc_be_ctr(struct proxy *be)
|
|||||||
{
|
{
|
||||||
be->counters.cum_beconn++;
|
be->counters.cum_beconn++;
|
||||||
update_freq_ctr(&be->be_sess_per_sec, 1);
|
update_freq_ctr(&be->be_sess_per_sec, 1);
|
||||||
if (be->be_sess_per_sec.curr_ctr > be->be_sps_max)
|
if (be->be_sess_per_sec.curr_ctr > be->counters.be_sps_max)
|
||||||
be->be_sps_max = be->be_sess_per_sec.curr_ctr;
|
be->counters.be_sps_max = be->be_sess_per_sec.curr_ctr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _PROTO_PROXY_H */
|
#endif /* _PROTO_PROXY_H */
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
include/proto/server.h
|
* include/proto/server.h
|
||||||
This file defines everything related to servers.
|
* This file defines everything related to servers.
|
||||||
|
*
|
||||||
Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
|
* Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
|
||||||
|
*
|
||||||
This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
License as published by the Free Software Foundation, version 2.1
|
* License as published by the Free Software Foundation, version 2.1
|
||||||
exclusively.
|
* exclusively.
|
||||||
|
*
|
||||||
This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PROTO_SERVER_H
|
#ifndef _PROTO_SERVER_H
|
||||||
#define _PROTO_SERVER_H
|
#define _PROTO_SERVER_H
|
||||||
@ -40,8 +40,8 @@ static void inline srv_inc_sess_ctr(struct server *s)
|
|||||||
{
|
{
|
||||||
s->counters.cum_sess++;
|
s->counters.cum_sess++;
|
||||||
update_freq_ctr(&s->sess_per_sec, 1);
|
update_freq_ctr(&s->sess_per_sec, 1);
|
||||||
if (s->sess_per_sec.curr_ctr > s->sps_max)
|
if (s->sess_per_sec.curr_ctr > s->counters.sps_max)
|
||||||
s->sps_max = s->sess_per_sec.curr_ctr;
|
s->counters.sps_max = s->sess_per_sec.curr_ctr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _PROTO_SERVER_H */
|
#endif /* _PROTO_SERVER_H */
|
||||||
|
@ -28,6 +28,10 @@ struct pxcounters {
|
|||||||
long long cum_feconn, cum_beconn; /* cumulated number of processed sessions */
|
long long cum_feconn, cum_beconn; /* cumulated number of processed sessions */
|
||||||
long long cum_lbconn; /* cumulated number of sessions processed by load balancing */
|
long long cum_lbconn; /* cumulated number of sessions processed by load balancing */
|
||||||
|
|
||||||
|
unsigned int fe_sps_max; /* maximum of new sessions per second seen on the frontend */
|
||||||
|
unsigned int be_sps_max; /* maximum of new sessions per second seen on the backend */
|
||||||
|
unsigned int nbpend_max; /* max number of pending connections with no server assigned yet */
|
||||||
|
|
||||||
long long bytes_in; /* number of bytes transferred from the client to the server */
|
long long bytes_in; /* number of bytes transferred from the client to the server */
|
||||||
long long bytes_out; /* number of bytes transferred from the server to the client */
|
long long bytes_out; /* number of bytes transferred from the server to the client */
|
||||||
|
|
||||||
@ -51,6 +55,10 @@ struct licounters {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct srvcounters {
|
struct srvcounters {
|
||||||
|
unsigned int cur_sess_max; /* max number of currently active sessions */
|
||||||
|
unsigned int nbpend_max; /* max number of pending connections reached */
|
||||||
|
unsigned int sps_max; /* maximum of new sessions per second seen on this server */
|
||||||
|
|
||||||
long long cum_sess; /* cumulated number of sessions really sent to this server */
|
long long cum_sess; /* cumulated number of sessions really sent to this server */
|
||||||
long long cum_lbconn; /* cumulated number of sessions directed by load balancing */
|
long long cum_lbconn; /* cumulated number of sessions directed by load balancing */
|
||||||
|
|
||||||
|
@ -197,13 +197,11 @@ struct proxy {
|
|||||||
} timeout;
|
} timeout;
|
||||||
char *id, *desc; /* proxy id (name) and description */
|
char *id, *desc; /* proxy id (name) and description */
|
||||||
struct list pendconns; /* pending connections with no server assigned yet */
|
struct list pendconns; /* pending connections with no server assigned yet */
|
||||||
int nbpend, nbpend_max; /* number of pending connections with no server assigned yet */
|
int nbpend; /* number of pending connections with no server assigned yet */
|
||||||
int totpend; /* total number of pending connections on this instance (for stats) */
|
int totpend; /* total number of pending connections on this instance (for stats) */
|
||||||
unsigned int feconn, beconn; /* # of active frontend and backends sessions */
|
unsigned int feconn, beconn; /* # of active frontend and backends sessions */
|
||||||
struct freq_ctr fe_sess_per_sec; /* sessions per second on the frontend */
|
struct freq_ctr fe_sess_per_sec; /* sessions per second on the frontend */
|
||||||
unsigned int fe_sps_max; /* maximum of new sessions per second seen on the frontend */
|
|
||||||
struct freq_ctr be_sess_per_sec; /* sessions per second on the backend */
|
struct freq_ctr be_sess_per_sec; /* sessions per second on the backend */
|
||||||
unsigned int be_sps_max; /* maximum of new sessions per second seen on the backend */
|
|
||||||
unsigned int maxconn; /* max # of active sessions on the frontend */
|
unsigned int maxconn; /* max # of active sessions on the frontend */
|
||||||
unsigned int fe_sps_lim; /* limit on new sessions per second on the frontend */
|
unsigned int fe_sps_lim; /* limit on new sessions per second on the frontend */
|
||||||
unsigned int fullconn; /* #conns on backend above which servers are used at full load */
|
unsigned int fullconn; /* #conns on backend above which servers are used at full load */
|
||||||
@ -244,6 +242,7 @@ struct proxy {
|
|||||||
*rsp_cap_pool;
|
*rsp_cap_pool;
|
||||||
struct pool_head *hdr_idx_pool; /* pools of pre-allocated int* used for headers indexing */
|
struct pool_head *hdr_idx_pool; /* pools of pre-allocated int* used for headers indexing */
|
||||||
char *req_add[MAX_NEWHDR], *rsp_add[MAX_NEWHDR]; /* headers to be added */
|
char *req_add[MAX_NEWHDR], *rsp_add[MAX_NEWHDR]; /* headers to be added */
|
||||||
|
struct pxcounters counters; /* statistics counters */
|
||||||
int grace; /* grace time after stop request */
|
int grace; /* grace time after stop request */
|
||||||
char *check_req; /* HTTP or SSL request to use for PR_O_HTTP_CHK|PR_O_SSL3_CHK */
|
char *check_req; /* HTTP or SSL request to use for PR_O_HTTP_CHK|PR_O_SSL3_CHK */
|
||||||
int check_len; /* Length of the HTTP or SSL3 request */
|
int check_len; /* Length of the HTTP or SSL3 request */
|
||||||
@ -257,8 +256,6 @@ struct proxy {
|
|||||||
int no_options; /* PR_O_REDISP, PR_O_TRANSP, ... */
|
int no_options; /* PR_O_REDISP, PR_O_TRANSP, ... */
|
||||||
int no_options2; /* PR_O2_* */
|
int no_options2; /* PR_O2_* */
|
||||||
|
|
||||||
struct pxcounters counters; /* statistics counters */
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
const char *file; /* file where the section appears */
|
const char *file; /* file where the section appears */
|
||||||
int line; /* line where the section appears */
|
int line; /* line where the section appears */
|
||||||
|
@ -83,10 +83,12 @@ struct server {
|
|||||||
|
|
||||||
struct proxy *proxy; /* the proxy this server belongs to */
|
struct proxy *proxy; /* the proxy this server belongs to */
|
||||||
int served; /* # of active sessions currently being served (ie not pending) */
|
int served; /* # of active sessions currently being served (ie not pending) */
|
||||||
int cur_sess, cur_sess_max; /* number of currently active sessions (including syn_sent) */
|
int cur_sess; /* number of currently active sessions (including syn_sent) */
|
||||||
unsigned maxconn, minconn; /* max # of active sessions (0 = unlimited), min# for dynamic limit. */
|
unsigned maxconn, minconn; /* max # of active sessions (0 = unlimited), min# for dynamic limit. */
|
||||||
int nbpend, nbpend_max; /* number of pending connections */
|
int nbpend; /* number of pending connections */
|
||||||
int maxqueue; /* maximum number of pending connections allowed */
|
int maxqueue; /* maximum number of pending connections allowed */
|
||||||
|
struct srvcounters counters; /* statistics counters */
|
||||||
|
|
||||||
struct list pendconns; /* pending connections */
|
struct list pendconns; /* pending connections */
|
||||||
struct task *check; /* the task associated to the health check processing */
|
struct task *check; /* the task associated to the health check processing */
|
||||||
|
|
||||||
@ -127,11 +129,8 @@ struct server {
|
|||||||
short check_status, check_code; /* check result, check code */
|
short check_status, check_code; /* check result, check code */
|
||||||
|
|
||||||
struct freq_ctr sess_per_sec; /* sessions per second on this server */
|
struct freq_ctr sess_per_sec; /* sessions per second on this server */
|
||||||
unsigned int sps_max; /* maximum of new sessions per second seen on this server */
|
|
||||||
int puid; /* proxy-unique server ID, used for SNMP */
|
int puid; /* proxy-unique server ID, used for SNMP */
|
||||||
|
|
||||||
struct srvcounters counters; /* statistics counters */
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
const char *file; /* file where the section appears */
|
const char *file; /* file where the section appears */
|
||||||
int line; /* line where the section appears */
|
int line; /* line where the section appears */
|
||||||
|
@ -856,8 +856,8 @@ int connect_server(struct session *s)
|
|||||||
if (s->srv) {
|
if (s->srv) {
|
||||||
s->flags |= SN_CURR_SESS;
|
s->flags |= SN_CURR_SESS;
|
||||||
s->srv->cur_sess++;
|
s->srv->cur_sess++;
|
||||||
if (s->srv->cur_sess > s->srv->cur_sess_max)
|
if (s->srv->cur_sess > s->srv->counters.cur_sess_max)
|
||||||
s->srv->cur_sess_max = s->srv->cur_sess;
|
s->srv->counters.cur_sess_max = s->srv->cur_sess;
|
||||||
if (s->be->lbprm.server_take_conn)
|
if (s->be->lbprm.server_take_conn)
|
||||||
s->be->lbprm.server_take_conn(s->srv);
|
s->be->lbprm.server_take_conn(s->srv);
|
||||||
}
|
}
|
||||||
|
@ -1084,7 +1084,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri)
|
|||||||
"<td align=right>%s</td><td align=right>%s</td>"
|
"<td align=right>%s</td><td align=right>%s</td>"
|
||||||
"",
|
"",
|
||||||
U2H0(read_freq_ctr(&px->fe_sess_per_sec)),
|
U2H0(read_freq_ctr(&px->fe_sess_per_sec)),
|
||||||
U2H1(px->fe_sps_max), LIM2A2(px->fe_sps_lim, "-"),
|
U2H1(px->counters.fe_sps_max), LIM2A2(px->fe_sps_lim, "-"),
|
||||||
U2H3(px->feconn), U2H4(px->counters.feconn_max), U2H5(px->maxconn),
|
U2H3(px->feconn), U2H4(px->counters.feconn_max), U2H5(px->maxconn),
|
||||||
U2H6(px->counters.cum_feconn), U2H7(px->counters.bytes_in), U2H8(px->counters.bytes_out));
|
U2H6(px->counters.cum_feconn), U2H7(px->counters.bytes_in), U2H8(px->counters.bytes_out));
|
||||||
|
|
||||||
@ -1138,7 +1138,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri)
|
|||||||
px->state == PR_STIDLE ? "FULL" : "STOP",
|
px->state == PR_STIDLE ? "FULL" : "STOP",
|
||||||
relative_pid, px->uuid, STATS_TYPE_FE,
|
relative_pid, px->uuid, STATS_TYPE_FE,
|
||||||
read_freq_ctr(&px->fe_sess_per_sec),
|
read_freq_ctr(&px->fe_sess_per_sec),
|
||||||
px->fe_sps_lim, px->fe_sps_max);
|
px->fe_sps_lim, px->counters.fe_sps_max);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buffer_feed_chunk(rep, &msg) >= 0)
|
if (buffer_feed_chunk(rep, &msg) >= 0)
|
||||||
@ -1301,9 +1301,9 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri)
|
|||||||
"",
|
"",
|
||||||
(sv->state & SRV_BACKUP) ? "backup" : "active",
|
(sv->state & SRV_BACKUP) ? "backup" : "active",
|
||||||
sv_state, sv->id,
|
sv_state, sv->id,
|
||||||
U2H0(sv->nbpend), U2H1(sv->nbpend_max), LIM2A2(sv->maxqueue, "-"),
|
U2H0(sv->nbpend), U2H1(sv->counters.nbpend_max), LIM2A2(sv->maxqueue, "-"),
|
||||||
U2H3(read_freq_ctr(&sv->sess_per_sec)), U2H4(sv->sps_max),
|
U2H3(read_freq_ctr(&sv->sess_per_sec)), U2H4(sv->counters.sps_max),
|
||||||
U2H5(sv->cur_sess), U2H6(sv->cur_sess_max), LIM2A7(sv->maxconn, "-"),
|
U2H5(sv->cur_sess), U2H6(sv->counters.cur_sess_max), LIM2A7(sv->maxconn, "-"),
|
||||||
U2H8(sv->counters.cum_sess), U2H9(sv->counters.cum_lbconn));
|
U2H8(sv->counters.cum_sess), U2H9(sv->counters.cum_lbconn));
|
||||||
|
|
||||||
chunk_printf(&msg,
|
chunk_printf(&msg,
|
||||||
@ -1406,8 +1406,8 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri)
|
|||||||
"%lld,%lld,"
|
"%lld,%lld,"
|
||||||
"",
|
"",
|
||||||
px->id, sv->id,
|
px->id, sv->id,
|
||||||
sv->nbpend, sv->nbpend_max,
|
sv->nbpend, sv->counters.nbpend_max,
|
||||||
sv->cur_sess, sv->cur_sess_max, LIM2A0(sv->maxconn, ""), sv->counters.cum_sess,
|
sv->cur_sess, sv->counters.cur_sess_max, LIM2A0(sv->maxconn, ""), sv->counters.cum_sess,
|
||||||
sv->counters.bytes_in, sv->counters.bytes_out,
|
sv->counters.bytes_in, sv->counters.bytes_out,
|
||||||
sv->counters.failed_secu,
|
sv->counters.failed_secu,
|
||||||
sv->counters.failed_conns, sv->counters.failed_resp,
|
sv->counters.failed_conns, sv->counters.failed_resp,
|
||||||
@ -1469,7 +1469,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri)
|
|||||||
/* rate */
|
/* rate */
|
||||||
chunk_printf(&msg, "%u,,%u,",
|
chunk_printf(&msg, "%u,,%u,",
|
||||||
read_freq_ctr(&sv->sess_per_sec),
|
read_freq_ctr(&sv->sess_per_sec),
|
||||||
sv->sps_max);
|
sv->counters.sps_max);
|
||||||
|
|
||||||
if (sv->state & SRV_CHECKED) {
|
if (sv->state & SRV_CHECKED) {
|
||||||
/* check_status */
|
/* check_status */
|
||||||
@ -1514,8 +1514,8 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri)
|
|||||||
/* sessions rate : current, max, limit */
|
/* sessions rate : current, max, limit */
|
||||||
"<td align=right>%s</td><td align=right>%s</td><td align=right></td>"
|
"<td align=right>%s</td><td align=right>%s</td><td align=right></td>"
|
||||||
"",
|
"",
|
||||||
U2H0(px->nbpend) /* or px->totpend ? */, U2H1(px->nbpend_max),
|
U2H0(px->nbpend) /* or px->totpend ? */, U2H1(px->counters.nbpend_max),
|
||||||
U2H2(read_freq_ctr(&px->be_sess_per_sec)), U2H3(px->be_sps_max));
|
U2H2(read_freq_ctr(&px->be_sess_per_sec)), U2H3(px->counters.be_sps_max));
|
||||||
|
|
||||||
chunk_printf(&msg,
|
chunk_printf(&msg,
|
||||||
/* sessions : current, max, limit, total, lbtot */
|
/* sessions : current, max, limit, total, lbtot */
|
||||||
@ -1591,7 +1591,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri)
|
|||||||
",,,"
|
",,,"
|
||||||
"\n",
|
"\n",
|
||||||
px->id,
|
px->id,
|
||||||
px->nbpend /* or px->totpend ? */, px->nbpend_max,
|
px->nbpend /* or px->totpend ? */, px->counters.nbpend_max,
|
||||||
px->beconn, px->counters.beconn_max, px->fullconn, px->counters.cum_beconn,
|
px->beconn, px->counters.beconn_max, px->fullconn, px->counters.cum_beconn,
|
||||||
px->counters.bytes_in, px->counters.bytes_out,
|
px->counters.bytes_in, px->counters.bytes_out,
|
||||||
px->counters.denied_req, px->counters.denied_resp,
|
px->counters.denied_req, px->counters.denied_resp,
|
||||||
@ -1605,7 +1605,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri)
|
|||||||
relative_pid, px->uuid,
|
relative_pid, px->uuid,
|
||||||
px->counters.cum_lbconn, STATS_TYPE_BE,
|
px->counters.cum_lbconn, STATS_TYPE_BE,
|
||||||
read_freq_ctr(&px->be_sess_per_sec),
|
read_freq_ctr(&px->be_sess_per_sec),
|
||||||
px->be_sps_max);
|
px->counters.be_sps_max);
|
||||||
}
|
}
|
||||||
if (buffer_feed_chunk(rep, &msg) >= 0)
|
if (buffer_feed_chunk(rep, &msg) >= 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
10
src/queue.c
10
src/queue.c
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Queue management functions.
|
* Queue management functions.
|
||||||
*
|
*
|
||||||
* Copyright 2000-2008 Willy Tarreau <w@1wt.eu>
|
* Copyright 2000-2009 Willy Tarreau <w@1wt.eu>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@ -147,14 +147,14 @@ struct pendconn *pendconn_add(struct session *sess)
|
|||||||
LIST_ADDQ(&sess->srv->pendconns, &p->list);
|
LIST_ADDQ(&sess->srv->pendconns, &p->list);
|
||||||
sess->srv->nbpend++;
|
sess->srv->nbpend++;
|
||||||
sess->logs.srv_queue_size += sess->srv->nbpend;
|
sess->logs.srv_queue_size += sess->srv->nbpend;
|
||||||
if (sess->srv->nbpend > sess->srv->nbpend_max)
|
if (sess->srv->nbpend > sess->srv->counters.nbpend_max)
|
||||||
sess->srv->nbpend_max = sess->srv->nbpend;
|
sess->srv->counters.nbpend_max = sess->srv->nbpend;
|
||||||
} else {
|
} else {
|
||||||
LIST_ADDQ(&sess->be->pendconns, &p->list);
|
LIST_ADDQ(&sess->be->pendconns, &p->list);
|
||||||
sess->be->nbpend++;
|
sess->be->nbpend++;
|
||||||
sess->logs.prx_queue_size += sess->be->nbpend;
|
sess->logs.prx_queue_size += sess->be->nbpend;
|
||||||
if (sess->be->nbpend > sess->be->nbpend_max)
|
if (sess->be->nbpend > sess->be->counters.nbpend_max)
|
||||||
sess->be->nbpend_max = sess->be->nbpend;
|
sess->be->counters.nbpend_max = sess->be->nbpend;
|
||||||
}
|
}
|
||||||
sess->be->totpend++;
|
sess->be->totpend++;
|
||||||
return p;
|
return p;
|
||||||
|
Loading…
Reference in New Issue
Block a user