mdsplus icon indicating copy to clipboard operation
mdsplus copied to clipboard

assign priorities to incoming mdsip connections

Open vadim-at-te opened this issue 1 year ago • 1 comments

Affiliation Tokamak Energy, 173 Brook Dr, Milton, Abingdon, UK

Description We experience a serious problem where, due to a relative large traffic of mdsip clients trying to connect to MDSplus server, some connections failed. The most acute problem is that systems that write (tokamak plasma pulse) experimental raw data to MDSplus frequently fail to store data. Clearly, we'd like to assign high-priority to those client ip-addresses and/or usernames that are associated with servers writing experimental data to MDSplus and low-priority to mdsip clients that simply read data for analysis.

The desired behaviour is that in the event of too many mdsip connections, the (small number of) high priority clients are always successful at connecting and writing data and (the large number of) low priority read clients may have connection attempts fail.

the file /etc/mdsip.hosts looks like a config file where it could make sense to specify such prioritization per client ip and username

I will raise a separate issue about sporadic failures to connect to MDSplus server

Example I am happy to write code as a contributor and submit it for a merge review if you point me in the right direction.

Otherwise, I don't have a pseudocode example but I have a user-experience example. I'd like to be able to assign linux process priority number or mdsplus-internal-equivalent in /etc/mdsip.hosts, like so: #* | MAP_TO_LOCAL dt100* | te.user PRIO 10 @192.168.2. | te.user PRIO 40

of course, it doesn't have to be in /etc/mdsip.hosts - it's the ultimate functionality that matters.

Additional context We experience problems where, during experimental campaign, several diagnostic systems fail to write raw data to MDSplus due to failure to connect to the server. Our linux admin had increased the Network Interface Card bandwidth and monitored to verify that the total number of incoming tcp connection the the physical-linux-server where MDSplus server is installed, is well within the spec. So we don't believe this to be a matter of networking hardware. Other tcp-based services appear fine. We are logging the total number of mdsip processes on the server and it hovers at around 1500.

I had asked questions on this topic on MDSplus "discord" forum: https://discord.com/channels/935565750679273482/935565751513935955/1248285737045200949

vadim-at-te avatar Jun 12 '24 08:06 vadim-at-te