none
[W8.1]Memory Compression is not running and causes Memory leaks in Windows 8 Store App RRS feed

  • Question

  • Hi All,

    We have developed Windows 8 Store application. My Client is reported memory leaks in app, then we used profiling tool and found some memory leaks in code and fixed. We have seen there is memory getting collected after fixes. But My client is not able to see in his Machine.

    After checking all missing areas. We are suspecting environment now. My Client is running application on "Windows 8 Machine" and We have verified on "Windows 10 Machine". We are able to see "Memory Compression"(ntoskrnl.exe) in Windows 10 Machine. and not in Windows 8 Machine. 

    My Questions are:

    1. Is this expected in Windows 8 Machine?

    2. Why Windows 8 Machine not running "Memory Compression"(ntoskrnl.exe)

    3. How can we fix the problem at client end?

    4. Is suggestible to run "Memory Compression"(ntoskrnl.exe) manually? 

    Windows 10 Insider (Build-14295) Memory : 323MB, 331MB, 335MB, 337MB, 340MB, 335MB, 339MB, 339MB, 336MB, 322MB, 317MB, 252MB, 261MB, ...

    Windows 8 Memory   : 384MB, 399MB, 415MB, 419MB, 440MB, 443MB, 482MB, 486MB, 490MB, ...

    We also tried "Task Manager" -> "Run new Task" -> "ntoskrnl.exe" but "Memory Compression" is not started.

    Please help us to focus on right area.

    Note: Tag the correct forum category if this is not in correct forum


    Pallam Madhukar Windows Phone Developer



    Tuesday, May 17, 2016 7:51 AM

Answers

  • @Pallam Madhukar,

    There are actually improvements when upgrading to windows10, see here https://blogs.windows.com/windowsexperience/2015/08/18/announcing-windows-10-insider-preview-build-10525/

    "In Windows 10, we have added a new concept in the Memory Manager called a compression store, which is an in-memory collection of compressed pages. This means that when Memory Manager feels memory pressure, it will compress unused pages instead of writing them to disk. This reduces the amount of memory used per process, allowing Windows 10 to maintain more applications in physical memory at a time. This also helps provide better responsiveness across Windows 10. The compression store lives in the System process’s working set. Since the system process holds the store in memory, its working set grows larger exactly when memory is being made available for other processes. This is visible in Task Manager and the reason the System process appears to be consuming more memory than previous releases.
    Read more at https://blogs.windows.com/windowsexperience/2015/08/18/announcing-windows-10-insider-preview-build-10525/#iF6G9Dh1soVARy6L.99
    "

    However this is not the right way for you to develop your app. You need to find out the reason why your application is using so much memory and correct it.

    Best regards,

    Barry


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Barry Wang Friday, May 20, 2016 9:46 AM
    • Proposed as answer by Barry Wang Wednesday, June 1, 2016 10:59 AM
    • Marked as answer by Barry Wang Friday, June 3, 2016 2:30 AM
    Friday, May 20, 2016 9:46 AM

All replies

  • Update:

    We have seen "Memory Compression"(ntoskrnl.exe)  is running on only Windows 10 Insider Builds(Build-14295).

    In Windows 10 Build 10586 GA "Memory Compression"(ntoskrnl.exe)  is not running but the result matches with Windows 10 Insider Build.

    App behavior in Windows 10 Build 10586 GA :

    320MB, 332MB, 332MB, 333MB, 332MB, 338MB, 355MB, 349MB, 348MB, 351MB, 349MB, 345MB, 349MB, 289MB, 295MB, 280MB, ...

    Please help us to find the route cause of different behaviors

    Thanks, 

     


    Pallam Madhukar Windows Phone Developer

    Tuesday, May 17, 2016 9:26 AM
  • Hello Pallam Madhukar,

    >>But My client is not able to see in his Machine.

    I don't understand this, what is your client here, do you mean you cannot use your profile tool to get this memory raising issue?

    >>We are able to see "Memory Compression"(ntoskrnl.exe) in Windows 10 Machine. and not in Windows 8 Machine. 

    I've done a research about this issue, it seems the Memory Compression is introduced in Windows 10, so maybe it is not a Windows 8 feature.

    However it is hard for me to tell you anything about why Windows 8 do not have this feature. The system feature issue should be talked in some other product forum, not developing forum.

    I'm thinking one possible thing. Is it possible that something in your app is causing this problem but you haven't been able to find the reason or the API out? What is your Visual Studio version and have you tried the Diagnostic Tools in Visual Studio 2015 to see details?

    Best regards,

    Barry


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Barry Wang Friday, May 20, 2016 9:25 AM
    Wednesday, May 18, 2016 8:05 AM
  • Hi Barry,

    My Windows 8.1 Store Application is causing memory issue only on windows 8.1.

    Same windows 8.1 app running on windows 10 able to collect the garbage.

    We have used VS2015 Diagnostic Tools and not find any of my project object references.

    Does it mean that the GC has improved in windows 10. I am just wondering what can be done to ensure that windows 8 GC collect the garbage like windows 10?

    Thanks,

    Pallam Madhukar 


    Pallam Madhukar Windows Phone Developer


    Friday, May 20, 2016 4:17 AM
  • @Pallam Madhukar,

    There are actually improvements when upgrading to windows10, see here https://blogs.windows.com/windowsexperience/2015/08/18/announcing-windows-10-insider-preview-build-10525/

    "In Windows 10, we have added a new concept in the Memory Manager called a compression store, which is an in-memory collection of compressed pages. This means that when Memory Manager feels memory pressure, it will compress unused pages instead of writing them to disk. This reduces the amount of memory used per process, allowing Windows 10 to maintain more applications in physical memory at a time. This also helps provide better responsiveness across Windows 10. The compression store lives in the System process’s working set. Since the system process holds the store in memory, its working set grows larger exactly when memory is being made available for other processes. This is visible in Task Manager and the reason the System process appears to be consuming more memory than previous releases.
    Read more at https://blogs.windows.com/windowsexperience/2015/08/18/announcing-windows-10-insider-preview-build-10525/#iF6G9Dh1soVARy6L.99
    "

    However this is not the right way for you to develop your app. You need to find out the reason why your application is using so much memory and correct it.

    Best regards,

    Barry


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Barry Wang Friday, May 20, 2016 9:46 AM
    • Proposed as answer by Barry Wang Wednesday, June 1, 2016 10:59 AM
    • Marked as answer by Barry Wang Friday, June 3, 2016 2:30 AM
    Friday, May 20, 2016 9:46 AM