Disabling garbage collection ( gc_enable(false) ) can have a big impact on the CPU usage but will likely lead to memory leaks. (The next GMS update should fix this)
Also make sure in your room settings that "Clear display Buffer" is disabled and no background layers are activated.
"game_set_speed(60,gamespeed_fps);" can also be used with the lowest possible number for the FPS and a low sleep margin. I get about 1% CPU usage on my mediocre work computer with these settings.
Thanks for the help.
gc_enable(false) didn't reduce cpu usage for me, but "Clear display buffer" and game_set_speed(60,gamespeed_fps); did reduced max cpu usage by an average of 2-3 percent. So after that tweaking for the small server application took around 5 percent cpu usage.
I reduced sleep margin to 0.1/0.01 , and that reduced cpu usage to 0.5-1 percent. Not sure if sleep margin really works with fractions though, or it is just truncing it to 0 sleep margin :/ (Anyone maybe knows?).
If you are looking to make a server program that has little overhead and can get good performance out of hardware, then GM isn't what you should use really. Making the server application in another language will give you much better performance and possibly allow you to run it headless, if it's that kind of server.
Haven't found any guides on how to do that with game maker studio plus I'll need to refresh my knowledge on Java , or even worse, c++. If you can refer me to some useful resources , I will appreciate it .