0

I have a small web API with a single controller hosted as WebApp(scaled out), but when under load I see that there is a disk queue enter image description here

Data returned from the controller is from MemoryCache, nothing to require disk usage. If I connect through FTP, there is nothing new created in LogFiles or any other folder. So where is this Disk Queue coming from? Could it affect the performance? (There is a HTTP queue for no apparent reason, there are multiple instances and CPU is at 50%, memory not even 20%)

collinx
  • 39
  • 1
  • 9
Silencer
  • 1,602
  • 4
  • 17
  • 27
  • Where does the data you have in MemoryCache come from? And what's the cache's memory footprint? Could it be you're doing disk I/O to get this data? There's probably a reason for the Disk Queue, you're just not sure what it is yet ;) – rickvdbosch Jul 19 '17 at 10:30
  • @RickvandenBosch - From a Sql Database, for testing I use a single route, the data is always cached. The other thing I have added is Application Insights SDK, nothing else. – Silencer Jul 19 '17 at 10:35
  • If there's only one controller, maybe you can share some (relevant) code? – rickvdbosch Jul 19 '17 at 10:41
  • @RickvandenBosch Nothing to show, it's just a line `return _dataProvider.GetDogs();` where it gets record from DB or MemoryCache. Running it locally I can see that IIS is writing on disk 4MB/s, but I am not sure what, and don't think this would cause disk queues. – Silencer Jul 19 '17 at 14:00

1 Answers1

0

So where is this Disk Queue coming from?

Based on my understanding, when we use MemoryCache it doesn't indicate that it has no disk I/O. While process a program, but it doesn't indicate that all of the data is stored in the physically memory, some of it will be stored in the virtual memory. It should be paging file,(pagefile.sys). It needs to read data from disk. In the local environment we could use microsfot supplied RAMMap tool to know how Windows is assigning physical memory, how much file data is cached in RAM, or how much RAM is used by the kernel and device drivers.

Tom Sun - MSFT
  • 24,161
  • 3
  • 30
  • 47
  • Why would it use virtual memory when RAM usage is at 10%? – Silencer Jul 20 '17 at 07:03
  • In my option, it doesn't mean that if RAM are all used then to use the virtual memory, we could get more info about [Why do we need virtual memory](https://stackoverflow.com/questions/19349572/why-do-we-need-virtual-memory). – Tom Sun - MSFT Jul 20 '17 at 07:17