-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce load on runs db #105
Comments
Hello, Regarding 1: Line 723 in 8f2a994
Maybe I don't understand the concept fully, but in line 716 is a selection columns which are read from the database and in the lines above (698 - 713) are the numbers of runs limited according the input to massive-ruciax. The idea is to pull once the necessary information from the run database to know which runs are necessary to upload then. I don't see how to reduce this request from the runDB. |
Ah, you're right, I was mistaken due to the comment "Select specific data sets" with the Line 289 in 8f2a994
Still, I think Line 1146 in 8f2a994
that looks like a full db dump, right? |
Yes it does. This function is older and was written when I was less experienced with the selection process. On the other other side, this function is called once or twice a week to test data base entries. I can adjust it at some point in the future but due to the low usage I don't think that it would be necessary. |
Ok, I thought it was a program that was left running (since it has a |
I went through cax looking for code that heavily loads the runs db. Probably one of these three is most significant:
massive_ruciax, massice_tsmclient andcax_tape_log_file basically doeswhile True: fetch most of runs db
:https://github.com/XENON1T/cax/blob/8f2a99450cc79a3db7ccec0294ead7a6952122fd~~/cax/main.py#L1146
The last one literally does this, the others have a bit of a query restricting it. massive_cax doesn't have this problem, as it uses a projection for the relevant query:cax/cax/main.py
Line 289 in 8f2a994
Every correction downloads the latest correction doc every time we check a run. One doc in particular is huge -- the electron lifetime beast. Perhaps we should just query the version string first.
Every cax task gets the full run doc of every run it runs on:
cax/cax/task.py
Line 48 in 291ab95
That includes runs it's just checking to e.g. see if corrections are up to date.
Then there are some more minor things:
cax/cax/tasks/process.py
Line 68 in c3686e3
The text was updated successfully, but these errors were encountered: