<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=929241604-14052004><FONT face="Courier New" 
size=2>fascinating!!! thank you for that helpful insight!!! (feel free to send 
more emails on the intricate innerworkings of linux)</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Mark J. DeFilippis 
  [mailto:defilm@acm.org]<BR><B>Sent:</B> Thursday, May 13, 2004 10:45 
  PM<BR><B>To:</B> cod@icculus.org<BR><B>Subject:</B> Re: [cod] Multiple Servers 
  on one box and PB<BR><BR></FONT></DIV>At 03:03 PM 5/10/2004, Andrew Urm 
  wrote:<BR>
  <BLOCKQUOTE class=cite cite="" type="cite">Additional server instances don't 
    take up more RAM? Really? Or were you&nbsp; saying something 
    else?<BR><BR>Andrew<BR><BR>luke@techfreak.org wrote:<BR><BR>
    <BLOCKQUOTE class=cite cite="" type="cite">Of course, there is a more 
      'elegant' way, but the guy is trying to<BR>get his feet wet here. So, I 
      suggested an easy method.<BR>Also, I have run test after test and it 
      doesnt take up any more RAM<BR>to run multiple installations, as opposed 
      to using base_path. Or are<BR>you taking about using disk 
      space?<BR>Luke<BR></BLOCKQUOTE></BLOCKQUOTE><BR><BR>Additional instances do 
  not take up more ram because the first instance<BR>pulls the executable page 
  code in to swap space in Unix/Linux. If you<BR>have enough RAM, (and that is 
  critical, or it Unix/Linux will need to page<BR>swap, and there goes the lag 
  game.. This falls on basic design theory for<BR>Unix... You can never have 
  enough ram. You always want to have enough RAM<BR>to run your programs in ram, 
  or you will page swap. Page swap = slow,<BR>without getting in to the nasty 
  details).&nbsp; How can I tell if I am page swapping?<BR><BR>run " 
  vmstat".&nbsp; Check the man page for vmstat.&nbsp; You will see a PI and 
  PO,<BR>these should be zero. If not, you are swapping in pages of code to 
  execute.<BR>Add more ram, and you may have to relink the kernel, but most 
  Unix/Linux<BR>version support up to 4GB or more for 32 bit.<BR><BR>The way it 
  works is this.... Code for each game will execute in ram, and<BR>share the 
  page, but each will get their OWN data area's for Heap 
  and<BR>Stack.<BR><BR>However, if one process (Game running) attempts to write 
  to a code<BR>page, Linux will do a "Copy on Fork()". This is viewable in 
  vmstat<BR>as well.&nbsp; Basically it means that "A copy using the shared code 
  attempted<BR>to modify it, so it make a separate copy for the process that 
  attempted to<BR>write to the code base".<BR><BR>Since this does not happen in 
  COD, or most processes for that matter,<BR>they all share the same single 
  image in Swap to load to ram, and the<BR>same single image of code in 
  RAM.&nbsp; If you were to put the processes<BR>in debug, and look at the 
  registers, you would see the code segment<BR>registers are all the same, but 
  the data pointer registers are all different.<BR><BR>Check out vmstat, and 
  read the man page. It is worth your time.<BR>It will give you some good 
  insight on how the resources are allocated...<BR><BR>Nice huh?&nbsp; Someday 
  Windows will really work like that, or maybe<BR>it will replace windows?&nbsp; 
  {;-))<BR><BR>MFrag<BR>{TRv}Team-Ravage<BR>aka. Mark J. DeFilippis, Ph. D 
  EE<BR><BR><BR><X-SIGSEP>
  <P></X-SIGSEP><TT>-------------------------------------------------------------------------------<BR>Mark 
  J. 
  DeFilippis&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  defilm@acm.org<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  defilm@ieee.org<BR><BR><BR></TT></P></BLOCKQUOTE></BODY></HTML>