Launch Windows executable without conhost?
Is there a way to programmatically launch a background (i.e. non-windowed) executable without launching an associated conhost.exe process?
I have tried code such as this in the launcher process that spawns the worker process(es):
var process = new Process();
process.StartInfo.FileName = executable;
process.StartInfo.Arguments = args;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
Any help would be appreciated.
Context:
We are doing performance and load testing. To replicate our large customer environments, we have leased server capacity to allow us to run thousands of virtual servers but they are memory constrained (~ 300-500MB memory per VM).
The scenario is to run 100 processes per VM. The combination of the ~1.3 MB executable process and the 4-5 MB conhost.exe process (on Windows Server Standard Edition core update 1803) makes it impossible to run 100 processes. If we could eliminate the associated conhost.exe, we'd have a shot.
Note: conhost is much smaller on a Windows 7 environment (< 800KB) but we have to use Windows server.
This same scenario works on Linux.
.net windows-server-2016 createprocess
add a comment |
Is there a way to programmatically launch a background (i.e. non-windowed) executable without launching an associated conhost.exe process?
I have tried code such as this in the launcher process that spawns the worker process(es):
var process = new Process();
process.StartInfo.FileName = executable;
process.StartInfo.Arguments = args;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
Any help would be appreciated.
Context:
We are doing performance and load testing. To replicate our large customer environments, we have leased server capacity to allow us to run thousands of virtual servers but they are memory constrained (~ 300-500MB memory per VM).
The scenario is to run 100 processes per VM. The combination of the ~1.3 MB executable process and the 4-5 MB conhost.exe process (on Windows Server Standard Edition core update 1803) makes it impossible to run 100 processes. If we could eliminate the associated conhost.exe, we'd have a shot.
Note: conhost is much smaller on a Windows 7 environment (< 800KB) but we have to use Windows server.
This same scenario works on Linux.
.net windows-server-2016 createprocess
2
conhost.exe is always required by a console mode app. So don't make it a console mode program. stackoverflow.com/a/2686476/17034
– Hans Passant
Nov 15 '18 at 22:20
You might change your console settings (window/buffer width and window/buffer height) to maybe squeeze out a few more bytes...
– Markus Safar
Nov 16 '18 at 1:17
The memory allocated to VMs is their "physical" memory. The memory used by processes is address space. If you add up the address space usage for all processes it'll often be far larger than the amount of memory that the OS is currently providing to those processes.
– Damien_The_Unbeliever
Nov 16 '18 at 7:38
add a comment |
Is there a way to programmatically launch a background (i.e. non-windowed) executable without launching an associated conhost.exe process?
I have tried code such as this in the launcher process that spawns the worker process(es):
var process = new Process();
process.StartInfo.FileName = executable;
process.StartInfo.Arguments = args;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
Any help would be appreciated.
Context:
We are doing performance and load testing. To replicate our large customer environments, we have leased server capacity to allow us to run thousands of virtual servers but they are memory constrained (~ 300-500MB memory per VM).
The scenario is to run 100 processes per VM. The combination of the ~1.3 MB executable process and the 4-5 MB conhost.exe process (on Windows Server Standard Edition core update 1803) makes it impossible to run 100 processes. If we could eliminate the associated conhost.exe, we'd have a shot.
Note: conhost is much smaller on a Windows 7 environment (< 800KB) but we have to use Windows server.
This same scenario works on Linux.
.net windows-server-2016 createprocess
Is there a way to programmatically launch a background (i.e. non-windowed) executable without launching an associated conhost.exe process?
I have tried code such as this in the launcher process that spawns the worker process(es):
var process = new Process();
process.StartInfo.FileName = executable;
process.StartInfo.Arguments = args;
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
Any help would be appreciated.
Context:
We are doing performance and load testing. To replicate our large customer environments, we have leased server capacity to allow us to run thousands of virtual servers but they are memory constrained (~ 300-500MB memory per VM).
The scenario is to run 100 processes per VM. The combination of the ~1.3 MB executable process and the 4-5 MB conhost.exe process (on Windows Server Standard Edition core update 1803) makes it impossible to run 100 processes. If we could eliminate the associated conhost.exe, we'd have a shot.
Note: conhost is much smaller on a Windows 7 environment (< 800KB) but we have to use Windows server.
This same scenario works on Linux.
.net windows-server-2016 createprocess
.net windows-server-2016 createprocess
edited Feb 7 at 15:45
Lony D.
175
175
asked Nov 15 '18 at 21:17
psparagopsparago
393412
393412
2
conhost.exe is always required by a console mode app. So don't make it a console mode program. stackoverflow.com/a/2686476/17034
– Hans Passant
Nov 15 '18 at 22:20
You might change your console settings (window/buffer width and window/buffer height) to maybe squeeze out a few more bytes...
– Markus Safar
Nov 16 '18 at 1:17
The memory allocated to VMs is their "physical" memory. The memory used by processes is address space. If you add up the address space usage for all processes it'll often be far larger than the amount of memory that the OS is currently providing to those processes.
– Damien_The_Unbeliever
Nov 16 '18 at 7:38
add a comment |
2
conhost.exe is always required by a console mode app. So don't make it a console mode program. stackoverflow.com/a/2686476/17034
– Hans Passant
Nov 15 '18 at 22:20
You might change your console settings (window/buffer width and window/buffer height) to maybe squeeze out a few more bytes...
– Markus Safar
Nov 16 '18 at 1:17
The memory allocated to VMs is their "physical" memory. The memory used by processes is address space. If you add up the address space usage for all processes it'll often be far larger than the amount of memory that the OS is currently providing to those processes.
– Damien_The_Unbeliever
Nov 16 '18 at 7:38
2
2
conhost.exe is always required by a console mode app. So don't make it a console mode program. stackoverflow.com/a/2686476/17034
– Hans Passant
Nov 15 '18 at 22:20
conhost.exe is always required by a console mode app. So don't make it a console mode program. stackoverflow.com/a/2686476/17034
– Hans Passant
Nov 15 '18 at 22:20
You might change your console settings (window/buffer width and window/buffer height) to maybe squeeze out a few more bytes...
– Markus Safar
Nov 16 '18 at 1:17
You might change your console settings (window/buffer width and window/buffer height) to maybe squeeze out a few more bytes...
– Markus Safar
Nov 16 '18 at 1:17
The memory allocated to VMs is their "physical" memory. The memory used by processes is address space. If you add up the address space usage for all processes it'll often be far larger than the amount of memory that the OS is currently providing to those processes.
– Damien_The_Unbeliever
Nov 16 '18 at 7:38
The memory allocated to VMs is their "physical" memory. The memory used by processes is address space. If you add up the address space usage for all processes it'll often be far larger than the amount of memory that the OS is currently providing to those processes.
– Damien_The_Unbeliever
Nov 16 '18 at 7:38
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53328013%2flaunch-windows-executable-without-conhost%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53328013%2flaunch-windows-executable-without-conhost%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
conhost.exe is always required by a console mode app. So don't make it a console mode program. stackoverflow.com/a/2686476/17034
– Hans Passant
Nov 15 '18 at 22:20
You might change your console settings (window/buffer width and window/buffer height) to maybe squeeze out a few more bytes...
– Markus Safar
Nov 16 '18 at 1:17
The memory allocated to VMs is their "physical" memory. The memory used by processes is address space. If you add up the address space usage for all processes it'll often be far larger than the amount of memory that the OS is currently providing to those processes.
– Damien_The_Unbeliever
Nov 16 '18 at 7:38