|
Back
Midas
Rome
Roody
Rootana
|
Midas DAQ System |
Not logged in |
|
|
27 Jul 2017, Wes Gohn, Suggestion, Increasing Max Number of Frontends
|
10 Aug 2017, Stefan Ritt, Suggestion, Increasing Max Number of Frontends
|
12 Aug 2017, Konstantin Olchanski, Suggestion, Increasing Max Number of Frontends
|
13 Aug 2017, Stefan Ritt, Suggestion, Increasing Max Number of Frontends
|
13 Aug 2017, Konstantin Olchanski, Suggestion, Increasing Max Number of Frontends
|
13 Aug 2017, Stefan Ritt, Suggestion, Increasing Max Number of Frontends
|
|
Message ID: 1312
Entry time: 10 Aug 2017
In reply to: 1309
Reply to this: 1313
|
Author: |
Stefan Ritt |
Topic: |
Suggestion |
Subject: |
Increasing Max Number of Frontends |
|
|
The sizeof checks were originally invented by KO to check for binary compatibility between processes attached to the same ODB and event buffers. So if a
compiler generates different structure sizes due to different padding, one would see that immediately. I wonder however if the absolute numbers make sense
here. We could replace the 16444 by
NAME_LENGTH + 7*sizeof(INT) + MAX_CLIENTS *(NAME_LENGTH+13*sizeof(INT)+sizeof(float)+2*sizeof(DWORD)+MAX_EVENT_REQUESTS*4*sizeof(INT))
which makes this value automatically scale when one changes MAX_CLIENTS.
People of course have to be aware that if one changes MAX_CLIENTS, then all programs connected to the same ODB or event buffer need to be re-compiled
and the ODB needs to be re-created from an ASCII file, but at least this would avoid tedious manual calculations.
Any opinion?
Stefan
> Below are the steps we used to increase the maximum number of frontends that we could run.
>
> In midas.h
>
> #define MAX_CLIENTS 64
>
> changed to
>
> #define MAX_CLIENTS 128
>
> In msystem.h:
>
> #define MAX_RPC_CONNECTION 64
>
> changed to
>
> #define MAX_RPC_CONNECTION 128
>
> In odb.c:
>
> assert(sizeof(BUFFER_HEADER) == 16444);
>
> GUESS: 256*64+60 = 16444, so change 64 to 128
>
> changed to:
>
> assert(sizeof(BUFFER_HEADER) == 32828); //256*128+60
>
>
>
> DATABASE_HEADER = 64 + 64*DATABASE_CLIENT = 64 + 64*8256 = 528448
>
> changed to:
>
> DATABASE_HEADER = 64 + 128*DATABASE_CLIENT = 64 + 128*8256 = 1056832. |