Memory consumption: Service vs Executable application types - Advanced Installer Community
jbord
Posts: 1
Joined: Mon Nov 25, 2019 3:11 pm

Memory consumption: Service vs Executable application types

Hello,

We've been using Advanced Installer create an executable for a Java application on Windows. We noticed that when we run it as an executable (Application Type=executable), it has a lower memory footprint than when we run it as a Windows service (Application Type=service). Another difference is that when we run it as a service, we run it under System, but when we run it as an executable, it is run under an administrator account.


Do you have any idea why this might be the case? The difference in footprint is quite significant (100s of MBs).

Thanks!
Jonathan
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Memory consumption: Service vs Executable application types

Hello Jonathan and welcome to Advanced Installer forums,

Unfortunately, I am not quite sure I understand your scenario here.
We noticed that when we run it as an executable (Application Type=executable), it has a lower memory footprint than when we run it as a Windows service (Application Type=service).
By this, do you mean that your java application is consuming more memory when its type is of "Graphical User Interface"
JavaGUI.png
JavaGUI.png (38.08 KiB) Viewed 1694 times
as opposed to when its type is of "Win32 Service"?
JavaWin32Serv.png
JavaWin32Serv.png (36.57 KiB) Viewed 1694 times
If this is the case, I'm afraid that I'm not aware why this happens. I have run a small test using this scenario as a starting point and I could notice (using task manager) that the memory consumption is the same. I have also discussed with the developer and he mentioned that he is not aware either of any case in which the memory consumption is increased when the application type is changed from GUI to Win32 Service.

This leads me to think that this might be related to the application itself.

Please let me know if that is not the case and I will try to further investigate this.
Another difference is that when we run it as a service, we run it under System, but when we run it as an executable, it is run under an administrator account.
In what regards this, indeed, you are right. The SYSTEM account is used by the operating system and by services that run under Windows. There are many services and processes in the Windows operating system that need the capability to sign in internally, such as during a Windows installation. The SYSTEM account was designed for that purpose, and Windows manages the SYSTEM account’s user rights. It is an internal account that does not show up in User Manager, and it cannot be added to any groups.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”