codeproject / CodeProject.AI-Server

CodeProject.AI Server is a self contained service that software developers can include in, and distribute with, their applications in order to augment their apps with the power of AI.
Other
574 stars 136 forks source link

Unnecessary IO activity on Windows #43

Closed janost closed 10 months ago

janost commented 1 year ago

Area of Concern

Describe the bug Running the AI server on Windows causes seemingly unnecessary IO activity. I observed that while the server is running and processing requests it writes a lot of temporary files to the C:\Windows\SystemTemp\ASPNETCORE_<uuid>.tmp path. Seemingly these are images, probably request bodies being buffered to the disk. This behaviour doesn't seem to be specific to any module, so I assume the server itself is doing this. If I stop the server the observed IO activity stops immediately.

Expected behavior Server should not buffer request bodies to temporary files or the server should provide an option to use memory for buffering requests.

Screenshots Screenshot from 2023-04-07 19-50-39

Your System (please complete the following information):

Additional context This seems to be an ASP.NET (default?) behaviour (see here), although I'm completely clueless about ASP.NET.

ChrisMaunder commented 1 year ago

This is part of the ASP.NET infrastructure. Are the files remaining in the temp directory, or are they being cleaned automatically?

janost commented 1 year ago

They are being cleaned up, so that's not an issue. In my use case there are several GiBs of images being processed daily doing a small amount of additional wear on the SSD.