Skip to content

Commit

Permalink
dbEvent tweak Queue size
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavidsaver committed Jun 26, 2019
1 parent 5b09bb6 commit c8e5dec
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/database/src/ioc/db/dbEvent.c
Expand Up @@ -49,7 +49,13 @@
#include "link.h"
#include "special.h"

#define EVENTSPERQUE 32
/* Queue size based on Ethernet MTU of 1500 bytes.
* Assume <=66 bytes of ethernet+IP+TCP overhead
* and 40 byte CA messages (DBF_TIME_DOUBLE).
*
* (1500-66)/40 -> 35
*/
#define EVENTSPERQUE 36
#define EVENTENTRIES 4 /* the number of que entries for each event */
#define EVENTQUESIZE (EVENTENTRIES * EVENTSPERQUE)
#define EVENTQEMPTY ((struct evSubscrip *)NULL)
Expand Down

3 comments on commit c8e5dec

@mdavidsaver
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anjohnson @ralphlange This change didn't reach my threshold for a merge request, but I do want to point it out. It is based on some testing I did looking at how fast scalar DBR_TIME_DOUBLE monitor updates could be transfered via. CA. Packet captures showed that even at high rate Ethernet frames were only 1306 bytes long. This change can squeeze a few more bytes into each frame.

I don't think it will have any ill-effects for other DBR_ types.

@ralphlange
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea. Agree that this should be fine.

@anjohnson
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation, no objections from me.

Please sign in to comment.