-
Notifications
You must be signed in to change notification settings - Fork 79
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
Workbench cannot handle wind energy's debug logging from Taskgraph #1497
Comments
Doug and I talked about possibly dis-allowing Taskgraph's DEBUG logging to reach the Workbench at all, only every allowing it to go the file handler. But that might involve some other tough decisions. Some options to accomplish this,
So far I'm inclined to leave the Workbench logging as-is, assuming we can make it perform adequately. |
Here's the ultimate crash from the Workbench. Out-of-memory.
I saw memory usage get up to 8 or 9 GB which seems strange when the entire logfile itself is only 159MB. So perhaps there is a memory leak here. |
The renderer's memory use is also very high when displaying a pre-existing logfile, such as from a recently completed invest run. For example, a logfile that is 25MB on disk causes the renderer to use ~1GB of memory when displaying the log. Closing the model tab does not immediately free the memory, though it does eventually. And then baseline memory use for the renderer is about 100 MB. |
I'm not certain why this ended up in the 3.15.0 milestone, perhaps only because we wanted to bump it from an earlier milestone. It feels like a bugfix release is more appropriate than a minor release. |
If we see this issue pop up elsewhere, we can look into ways to skip rendering particularly long messages in the Workbench (or block them from being passed to the Workbench in the first place), but since the wind data dictionary is the obvious culprit here, I think it makes most sense to address this in the Wind Energy module. |
Also, for what it's worth, in my initial testing I managed to generate a log file that is ~120MB on disk, and even TextEdit (Apple's basic text file viewer/editor) struggled with it, using nearly 2GB of RAM once I started scrolling through the file. So, while there could certainly be opportunities for performance tuning in the Workbench, I suspect a lot of what we were seeing here is just in the nature of rendering a massive text file in a GUI. |
That's interesting. Thanks for confirming that! |
Rob gave us a datastack that includes a large
wind_data_path
CSV input. It's about 5MB, which is 2-3x larger than our sample data CSV. WhenTaskgraph
logging level is set toDEBUG
, a single line that is more than 18 million characters long is logged. This causes the Workbench renderer to consume an unreasonable amount of memory and ultimately crash.The line begins,
That
other_argument
is thewind_data
argument in,For some reason, instead of passing the CSV as an argument to
_compute_density_harvested_fields
, we first read the CSV into a dict and pass that, sowind_data
here is a dict. I don't see any reason why we need to do this, so passing the CSV into the function would avoid this logging problem.Should the workbench more gracefully handle logging lines that are this long? Perhaps.
The text was updated successfully, but these errors were encountered: