How to package a headless Project?

Same way dedicated servers are headless.

I’ve tried using -nullRHI as a shortcut parameter, but it doesn’t work. Sure it looks headless, but the insane CPU is still there, so it doesn’t acctually solve the problem. It’s as if it just hid the program, but all the rendering does happen.

I imagine it would indeed need to be exported/packaged like servers are. But this is no server ofc, so how can this be done?

The program needs to graphics, no rendering at all, it should run in the background with little to no CPU usage, in the same way dedicated servers do. It’s a necessity for it to be packaged in a headless mode, else it just plain cannot work, cuz each program consumes roughly 20% of the CPU when it should consume less than 1%.

There is no documentation online about this.

edit: it also doesn’t need to be headless, it would do to simply package the program in a way that doesn’t include whatever is that it is including that cause it to use 20% of CPU. Like, it’s a black screen, there is nothing in the game. It makes no sense, and while packaging the project it shows stuff like “building niagara” which is… absolutely never used in the project. So any way to disable the engine packaging stuff like that would also be helpful, not THE solution, but a workaround. And I know it’s possible cuz dedicated servers do this, they consume no CPU… so there’s a way to package projects without all that stuff.

update: I managed to workaround it, idk how though. I toogled a lot of settings and then restarted the project, and something must’ve done the trick. Basically just disabled everything that seemed wouldn’t break the engine. That brought down CPU from 20% down to 2% but it’s still not good enough, should be at 0% when idle. And it’s only a workaround, but if this helps anyone here you go. The problem still remains though that it’s not as good as it being “headless”. and 2% vs less than 0.1% matters when you need hundreds running on a machine. Again though, this is just a workaround, it’s minimizing the problems not being able to package the project headless has. But help is still needed if someone knows how to do that.

I’m running dedicated servers on remote servers with advanced monitoring and despite there not being any rendering there is a baseline CPU usage of the software regardless of what is going on, but more so when functions are executing, but it’s never zero, more around 8-10% unless a lot is happening…

That’s the case for me to when something’s happening. when nothing is happening at all it is 0 though, as it should be. Idk if it’s the same case to you.

The thing is for non-server builds it’s around 20% by default, even if nothing is happening at all, just for existing. I thought running them inside a physical dedicated server which has no rendering would do the trick but nah… it’s as if something was off. Do you happen to know if there’s any way to export a client build as if it was a server build when it comes to this?

I’m not sure. The closest thing I could think of is perhaps an empty level, default game mode and such and functions running in the level blueprint in the background. I’m not sure exactly what it is you’re trying to do, but there will still be some overhead on the CPU and GPU, but not sure how much…

In case anyone else also finds it unclear, basically the title. How to package a client build “headless”, in the same way server builds are packaged. Which basically ignore all input and rendering stuff and only run the logic/code of whatever you are doing. Which makes them be viable to begin with as servers, cuz else the CPU and GPU consumption is enormous and simply not possible to have multiple programs on a machine.

We’re also trying to run Headless, on a Shipping Build, which improves performance by a lot and we know only by using a Custom Unreal Engine version will have a chance to do so.
But what exactly have you disabled, that gave performance back, that would be good to know really.
From our perspective, we’re trying to Disable Components (WidgetComponent etc.) that are not needed in Headless mode, but still running with each Client.