none
Memory leak when using Win32_PerfFormattedData_PerfProc_Process with LIKE operator to query PrivateBytes RRS feed

  • Question

  • In my monitor application, I need to observe bunch of processes - different exe or same exe running under different start up argument.  In order to be notified by those processes running same exe but diff arguments, LIKE operator is considered in my WMI query, see below:

    "SELECT * FROM __InstanceModificationEvent WITHIN 60

    WHERE TargetInstance ISA \"Win32_PerfFormattedData_PerfProc_Process\"

    AND (TARGETINSTANCE.NAME LIKE '%APP_1%'

    OR TARGETINSTANCE.NAME LIKE '%APP_2%'

    OR TARGETINSTANCE.NAME LIKE '%APP_3%'

    OR TARGETINSTANCE.NAME LIKE '%APP_4%'

    OR TARGETINSTANCE.NAME LIKE '%APP_5%')

    AND TargetInstance.PrivateBytes > 1159641169 "

    But when APP_X reach a limits, around 20 in my Windows Server 2008 R2 SP1 machine, svchost.exe begins to consume memory rapidly, then I have to manually stop svchost.exe that host WMI from Task Manager, then the memory usage will drop to reasonable status. Please advice...Thanks

    Wednesday, January 8, 2014 1:37 AM

Answers

  • Hi KJ Wen,

    Sorry for delay. I recommend you post thread on Microsoft Connect to contract out Product Term for more effective response. Please refer to the following link. https://connect.microsoft.com/.

    Regards,


    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.

    Thursday, January 16, 2014 7:55 AM
    Moderator

All replies

  • Hi KJ Wen,

    I find a hotfix can solve this memory leak issue, please see the following link of TechNET blog. http://blogs.technet.com/b/kevinholman/archive/2010/06/09/wmi-leaks-memory-on-server-2008-r2-monitored-agents.aspx.

    Regards,


    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.

    Thursday, January 9, 2014 7:33 AM
    Moderator
  • Thanks for reply. But first hotfix is not applicable to my Window Server 2008 R2 SP1 machine. Secondly, they are 2 different cases. The hotfix fixed memory leak in WimPrvSE.exe, but my case is huge memory leak in svchost.exe which host WMI service. 

    Reducing query length can be a workaround, but I don't think it could be the final solution. I do suspect it is an OS incident. 

    Wednesday, January 15, 2014 12:12 AM
  • Hi KJ Wen,

    Sorry for delay. I recommend you post thread on Microsoft Connect to contract out Product Term for more effective response. Please refer to the following link. https://connect.microsoft.com/.

    Regards,


    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.

    Thursday, January 16, 2014 7:55 AM
    Moderator