Giving Ns More Memory?
cortana
Join Date: 2003-01-11 Member: 12162Members
<div class="IPBDescription">Cache_TryAlloc complains</div> I'm trying to run an NS server on Linux (Debian 3.0), but the server process keeps exiting, after printing this to the console:
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->FATAL ERROR (shutting down): Cache_TryAlloc: 840192 is greater then free hunk<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
I assume this means NS is trying to grab more memory than the hlds process asked for from the OS. My question is, what command line option increases this amount? The command line I use to start the server is:
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->./hlds -zone 16384 -secure -pingboost 1 -game ns +map ns_bast<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
I tried increasing the <i>zone</i> argument to <i>32768</i>, but then the server dies immediatly, with:
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Host_Init
FATAL ERROR (shutting down): Hunk_Alloc: failed on 33554504 bytes<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
I'm not sure why the system would be denying the process 32 megs of RAM, since there's plenty free. Any takers for this no-doubt extremly n00b-like question? <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->FATAL ERROR (shutting down): Cache_TryAlloc: 840192 is greater then free hunk<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
I assume this means NS is trying to grab more memory than the hlds process asked for from the OS. My question is, what command line option increases this amount? The command line I use to start the server is:
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->./hlds -zone 16384 -secure -pingboost 1 -game ns +map ns_bast<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
I tried increasing the <i>zone</i> argument to <i>32768</i>, but then the server dies immediatly, with:
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Host_Init
FATAL ERROR (shutting down): Hunk_Alloc: failed on 33554504 bytes<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
I'm not sure why the system would be denying the process 32 megs of RAM, since there's plenty free. Any takers for this no-doubt extremly n00b-like question? <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
Comments
To allocate more memory to a windows server, the argument is -heapsize, not -zone. Im not sure if that works on linux or not but you can try it. I also don't think NS has VAC support yet so the -secure argument can be removed.
Try this runline and tell me what happends.
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->./hlds -game ns +map ns_bast -pingboost 1 -heapsize 64000<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Here's the switches I use. Although HL never uses near this ammount of memory. I'm pretty sure hl has a max limmit to the memory it can use, but my brains to fuzzy from lack of sleep. But as a general rule no server needs more the 392 megs dedicated to it. I just have memory to spare so figured wtf.
-heapsize 524288 -zone 20480 -debug
But I'm pretty sure HL will take what memory it needs to run. So this might not be your problem. How much memory do you have in the pc trying to run the server?
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
FATAL ERROR (shutting down): Cache_TryAlloc: 840192 is greater then free hunk
<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
I'm pretty sure that means the server try'd to allocate more memory, but there wasn't enuff free memory there. But meh, as I said, brains really fuzzy. I just looked in to see if the forums where actually up again.
Right now, I'm trying <i>./hlds -heapsize 65535 -pingboost 1</i>. I'm dropping the <i>-zone argument</i> for now as it didn't do what I thought it did in the first place.
The machine in question has a gig of RAM installed and another gig of swap on top of that, so my problem wasn't caused by <i>that</i>. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
If the server still doesn't stay up I'll experiment with giving it more memory with <i>-heapsize</i>, altering the order of the command line arguments and other general fiddling. Either way I'll post back here with what I find out!
<b>update</b>
Guys, the <i>-heapsize</i> argument works a treat. Thanks again!