<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>OK, I haven't read the email yet, But I am going to 
spend a good portion of this morning figuring this out. I will drop ya an email 
if I have any more questions. Thanks Dr. D for sheading some light on a topic 
that I have been most inttersted in but had no one to explain to 
me.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>=o)</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=defilm@acm.org href="mailto:defilm@acm.org">Mark J. DeFilippis</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=cod@icculus.org 
  href="mailto:cod@icculus.org">cod@icculus.org</A> ; <A title=cod@icculus.org 
  href="mailto:cod@icculus.org">cod@icculus.org</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, December 19, 2004 10:18 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [cod] Dr. D - This ones for 
  you.</DIV>
  <DIV><BR></DIV><BR>I am sorry Jay. I am a bit out of sorts as the Brits would 
  put it.<BR>I just got back from a 4 day zip through London, Paris, 
  Dusseldorf,<BR>and Milan, and back.&nbsp; My body does not know what time zone 
  it is<BR>in and my cognitive abilities are more like disabilities right now.. 
  ;-)<BR><BR><BR>If the game is all in the same partition, and you are using the 
  same executable<BR>you are golden. Just make sure they can execute it, and 
  read libraries,<BR>as well as NOT WRITE IT.<BR><BR>There are many ways to 
  allow the users to execute the executables.<BR>The user must have a way to 
  either execute the executable as "admincliffy"<BR>or you need to provide some 
  other way to allow them to execute the coduo_lnxded.<BR><BR>One way is to 
  allow the users to execute the file as if they were "admincliffy".<BR><BR>(See 
  http://catcode.com/teachmod/)<BR><BR>ex:<BR><BR>chmod u+s 
  coduo_lnxded<BR><BR><BR>An alternate way is to set the groups the same for the 
  users and the executables,<BR>then the users can have their own account 
  names.<BR><BR>So for coduo_lnxded , this would be owned by admincliffy, and 
  group "serveradmins".<BR>You want the users to be able to execute it, and 
  access the link libraries, bit NOT<BR>be able to change it.<BR><BR>So the mode 
  of the file&nbsp; should be -rwxr-x---.&nbsp; (Or mode:&nbsp; 
  750)<BR><BR>(sidebar... to show you there are no ceilings here... easy stuff! 
  ;-)<BR><BR>rwxr-xr--&nbsp; = mode 754.&nbsp; Here is simply how it 
  works.<BR><BR>r = 4, w = 2, x = 1<BR><BR>Why?&nbsp; Bit positions.. base 2 
  :&nbsp;&nbsp; 1, 2, 4, 8, etc.<BR><BR>There are three types of 
  permissions.&nbsp; USER, GROUP and OTHER (not user or group).<BR>This is why 
  there is 3 sets of rwx permissions.&nbsp; The left most are the USER,<BR>the 
  middle, GROUP, the last OTHER. (of everyone else..).<BR><BR>so to set the mode 
  as I stated above: -rwxr-x---<BR><BR>You can either execute:<BR><BR>chmod 
  u+rwx coduo_lnxded<BR>chmod g+rx coduo_lnxded<BR>chmod o-rwx 
  coduo_lnxded<BR><BR>Or more easily: since you now know each, the OWNER, GROUP, 
  and OTHER are<BR>represented by r=4, w=2, x=1... You can simply do it all in 
  one...<BR><BR>r+w+x = 4+2+1 = 7<BR>r+x = 4 + 1 = 5<BR>no r, no w, no x = 
  0<BR><BR>mode 750<BR><BR>hence:<BR><BR>chmod 750 coduo_lnxded<BR><BR>(see 
  http://catcode.com/teachmod/) for a pretty decent tutorial.&nbsp; But there is 
  no magic,<BR>just Linux likes binary... so note in base 2:<BR><BR>read bit = 4 
  = 100 binary<BR>write bit = 2 = 010 binary<BR>executable bit = 1 = 001 
  binary<BR><BR>Note that a 7 (allow read, write and execute) is:&nbsp; 
  111.<BR>Or if you add:<BR>100 + (read)<BR>010 + (write)<BR>001 + 
  (execute)<BR>-----<BR>111=&nbsp; or 7, (Read, plus Write, plus 
  Execute)<BR><BR>Nothing really fancy there at all!&nbsp; Easy to think of Read 
  as 4, Write as 2, and Execute as 1.<BR>Since I end up changing modes on files 
  a lot, using the numbers become very useful.<BR><BR>Now if the linux 
  executable files are GROUP "serveradmins", and lets say<BR>I am a customer, 
  user name may be "defilm", and group "serveradmins".<BR>The GROUP permissions 
  would apply, and hence I would be able to<BR>Read and Execute files with group 
  "serveradmins", but NOT WRITE<BR>them. (You don't want someone wiping your 
  executable and killing everyone's<BR>server).<BR><BR>This is also safer IMHO 
  than using a setuid and allowing users to execute<BR>files as another 
  user.<BR><BR>You get all the benefits of the virtual Memory operating system, 
  same<BR>executables, and it still allows each user to have their own identity 
  and<BR>private files (for say... mods directories), and provides you with 
  total<BR>control over the master installation.<BR><BR>I hope this helps.&nbsp; 
  I could have left out the explanation and just thrown in the<BR>commands like 
  chmod u+rx filename, but I wanted to show you it is only<BR>addition, and 
  actually there is no magic, and it is actually easier to use<BR>the numbers... 
  (one command vs. 3...).&nbsp; No ceilings involved. ;-))<BR><BR>If you need 
  any additional info, please feel free to email me at defilm@acm.org.<BR>I will 
  be happy to help in any way.<BR><BR>Happy Holidays,<BR><BR>Mark<BR><BR>Same 
  post... Alt subject:<BR><BR>ahhhhhhhhhhhhhhhhhhhhhhh!!!&nbsp; Where is the 
  Linux 1.5.1 binaries?? Monday. Ok.<BR>But WHY? That is what worries me. 
  :-(<BR><BR>BTW... I have a wildly successful server at 
  uo.team-ravage.com.&nbsp; It runs Foy, all weapons<BR>wide open, 34 users, and 
  is busy 24x7. (The US uses it, the UK uses it).&nbsp; However, it<BR>is not 
  fiscally reasonable for many of the admins on this list...&nbsp; It is a Dual 
  3.2Ghz<BR>P4, 2 GB. (It also runs a rifles only server UO, which is often busy 
  as well).<BR><BR>But it runs near 50-65% utilization. (Hello open tanks, jeeps 
  and n00bs...)<BR>This model does not bode well for virtual server utilization 
  obviously.&nbsp; I Just<BR>secured a duplicate server, and when I put uo 1.5.1 
  on there, I will make a DNS<BR>change, flipping the server over to 
  uo.team-ravage.com.&nbsp; I am preying the CPU looks<BR>much better.<BR><BR>I 
  wanted to mention this because I wanted to be able to do a comparison. So I 
  have<BR>all the metrics from this server for the past 5 weeks of nearly 24x7 
  fullness.<BR>In fact, I did this server as a test ironically, after not being 
  able to tame this<BR>FOY beast, wide open, no matter how I played with 
  Linux.&nbsp; My son said "Dad,<BR>you want a busy server, put up Foy, 
  24x7.&nbsp; The 13 y/o tike was right! Filled up<BR>right away. Word spread, 
  now it is used by the EU non-us hours, and US most<BR>of the US time. (I have 
  played on it, and I admit, it is kinda fun! Why shoot someone<BR>with a MP44, 
  when you can hit them with a flak canon? ;-)) (Actually some of the<BR>central 
  London side streets are kind of looking ratty like the scene, and I was 
  at<BR>the Ritz, on Buckingham Palace Drive while in London.&nbsp; Walk a few 
  blocks<BR>and up off center city... 4 blocks from the palace and those ally's 
  looked familiar,<BR>other than the ones in Foy don't have lots of little 
  taverns, and the walls on the buildings<BR>are in better condition in FOY. 
  ;-)) (No offense to the Brits out there. I love London, but it<BR>needs some 
  fixin)<BR><BR>I am hoping when I flip the DNS, they are all using the 
  servername.<BR>Likely they added it to their favorites, and will lose it. But 
  I have stated<BR>spamming announcements accordingly. If they read them, they 
  will be<BR>able to find the new 1.5.1...<BR><BR>It will be an excellent test, 
  as I have been monitoring that servers full<BR>resources over the past 5 
  weeks.&nbsp; If the same people flip over, it will<BR>really help see the 
  difference on one of the most resource intensive maps...<BR><BR>I will report 
  my findings back here of course.<BR><BR>Happy Holidays to all.&nbsp; Nice job 
  Ryan!&nbsp; Ya tha man!<BR><BR>Dr. D<BR><BR>At 05:25 PM 12/18/2004, Jay 
  Vasallo wrote:<BR>
  <BLOCKQUOTE class=cite cite="" type="cite"><FONT face=arial size=2>Nice 
    explanation Dr. D. Unfortunately, I am still sweeping floors and not 
    painting ceiling as you are. </FONT><BR>&nbsp;<BR><FONT face=arial size=2>I 
    have the game all loaded on the same partition.</FONT><BR>&nbsp;<BR><FONT 
    face=arial size=2>Main game is loaded at 
    <B>/games/cod-server/uo</B></FONT><BR>&nbsp;<BR><FONT face=arial 
    size=2>USER's are loctaed at 
    <B>/home/user/cod-server/uo</B></FONT><BR>&nbsp;<BR><FONT face=arial 
    size=2>I only have a single server.cfg in the 
    <B>/home/user/cod-server/uo/server.cfg</B></FONT><BR>&nbsp;<BR><FONT 
    face=arial size=2>I point to <B>/games/cod-server</B> as my executable 
    directory because this is where the </FONT><FONT face=arial color=#808080 
    size=2>coduo_lnxded </FONT><FONT face=arial size=2>resides:</FONT><BR><FONT 
    face=arial size=2>example: <B>/games/cod-server/</FONT><FONT face=arial 
    color=#808080 size=2>coduo_lnxded</B></FONT><BR>&nbsp;<BR><FONT face=arial 
    size=2>Now I make the <B>games/cod-server</B> owned by 
    admincliffy</FONT><BR>&nbsp;<BR>&nbsp;<BR><FONT face=arial size=2>I get that 
    far...But still unsure about this linking process you are trying to explain. 
    You say </FONT><BR>&nbsp;<BR><FONT face=arial size=2>"</FONT><FONT 
    face="Times New Roman, Times"> You should make the executable<BR>mode 0x750, 
    and owned by the admin, group GID, so it is RWX by you the admin, <BR>while 
    it is only readable and executable, but not writable by the Group of users 
    with<BR>group GID. There is no need for it to be."</FONT><BR>&nbsp;<BR><FONT 
    face="Times New Roman, Times">I say headache and start hitting the books. 
    Can you demonstrate how you would link the user to :</FONT><BR><FONT 
    face="Times New Roman, Times"><B>/games/cod-server</B> using this "<B>mode 
    0x750</B>" you refer to? </FONT><BR>&nbsp;<BR><FONT face=arial size=2>I 
    would appreciate this. </FONT><BR>&nbsp;<BR><FONT face=arial 
    size=2>=o)</FONT><BR><FONT 
    face=arial><BR></FONT>&nbsp;<BR>&nbsp;<BR>&nbsp;<BR>
    <DL>
      <DD>----- Original Message ----- <BR>
      <DD>From:</B> <A href="mailto:defilm@acm.org">Mark J. DeFilippis</A> <BR>
      <DD>To:</B> <A href="mailto:cod@icculus.org">cod@icculus.org</A> ; <A 
      href="mailto:cod@icculus.org">cod@icculus.org</A> <BR>
      <DD>Sent:</B> Saturday, December 18, 2004 3:58 PM<BR>
      <DD>Subject:</B> Re: [cod] Dr. D - This ones for you.<BR><BR><BR>
      <DD>Recently some updates were brought to my attention with<BR>
      <DD>regards to the sticky bit, and memory utilization (mbuf 
      allocation),<BR>
      <DD>and I did a little research...<BR><BR>
      <DD>The current writing referenced by many on this forum, is more 
      semantics<BR>
      <DD>than anything else.&nbsp; Dating back prior to Unix V.3, Memory was 
      very<BR>
      <DD>expensive. Hence, there was not often enough memory to keep all 
      executable<BR>
      <DD>(text) pages in memory, and in severe cases, entire programs were 
      swapped in<BR>
      <DD>and out, text pages were more often paged in and out as the CPU ran 
      out of<BR>
      <DD>text to execute on behalf of a program.&nbsp; The CPU would request 
      text code be<BR>
      <DD>read from swap, halt the program, put it on the I/O stack (waiting 
      I/O), and move<BR>
      <DD>on to the next program for a set period of time, for CPU 
      allocation.&nbsp; When the<BR>
      <DD>I/O was performed asynchronously, and the text copied in to memory, 
      the program<BR>
      <DD>put in Wait I/O state" was put in "Runnable state".&nbsp; Cpu would 
      then continue execution.<BR><BR>
      <DD>As memory became cheaper, Unix systems were able to store more text 
      pages<BR>
      <DD>in RAM, and in fact, you based your memory purchase on how large the 
      applications<BR>
      <DD>were going to be for the user base. This way you could assure that all 
      code could fit<BR>
      <DD>in memory, and hence Page swapping and Text page swapin, swapout was a 
      No-No, and<BR>
      <DD>a execution killer. (Today, these swap variables still exist in 
      vmstat, as it is not<BR>
      <DD>impossible to begin swapping text pages, and full page swapping is 
      just not done.<BR><BR>
      <DD>Today, with cheap ram, and faster disks, executable text is not even 
      copied to SWAP<BR>
      <DD>anymore, since the executable code is made of two parts.. The local 
      text portion of the<BR>
      <DD>code, and the shared link libraries reference.&nbsp; Between memory 
      size, and buffer sizes<BR>
      <DD>entire application text pages are loaded.&nbsp; No more swapping, no 
      more paging text pages,<BR>
      <DD>no more load from swap, so the sticky bit is irrelevant.<BR><BR>
      <DD>In reality, this was really the case under systems as old as Unix 
      V.3.2 as Unix moved<BR>
      <DD>to the Intel platform.&nbsp; When we designed applications, we made 
      sure there was always<BR>
      <DD>enough ram. A paging program is a "slow program".&nbsp; Gaming is much 
      more sensitive<BR>
      <DD>as you know.<BR><BR>
      <DD>Today, shared link libraries are loaded once. Your text code (The 
      portion that is not<BR>
      <DD>global link library based) is loaded in to ram. However, please note, 
      thing have not<BR>
      <DD>changed in relation to the memory usage for multiple copies of a 
      program!<BR><BR>
      <DD>If you load 7 copies of the executable, and the executables all have 
      different<BR>
      <DD>inodes, Linux has no way of knowing any two executables are the 
      same,<BR>
      <DD>hence it WILL load multiple copies in to ram. This can be 
seen.<BR><BR>
      <DD>If you link them, they will all have the same inode value. Linux will 
      load<BR>
      <DD>the code once using the same text pointers when executing. So there 
      is<BR>
      <DD>still value in using links to the same inode when invoking the same 
      program<BR>
      <DD>multiple times!<BR><BR><BR>
      <DD>In your specific case, I am assuming from the alternate path, that the 
      executables<BR>
      <DD>are on one partition, and the users homes on another.&nbsp; If you 
      link across file<BR>
      <DD>systems, of course Linux will make a copy, and all will have separate 
      inode<BR>
      <DD>values, and you are SOL.&nbsp; This of course consumes more memory, 
      and more disk.<BR>
      <DD>Likely no big deal on disk, but memory is still expensive to lease on 
      servers!<BR>
      <DD>($50/mo from 1-2GB upgrade is a lot).<BR><BR>
      <DD>If I were in your shoes, I would make a local copy of the executable 
      owned by<BR>
      <DD>the admin name whatever it is (not hopefully root), and link it to 
      each users<BR>
      <DD>directory.&nbsp; The users would be in the same GID.&nbsp; You should 
      make the executable<BR>
      <DD>mode 0x750, and owned by the admin, group GID, so it is RWX by you the 
      admin, <BR>
      <DD>while it is only readable and executable, but not writable by the 
      Group of users with<BR>
      <DD>group GID. There is no need for it to be.<BR><BR>
      <DD>You get to take advantage of the same inode value which is still more 
      efficient in<BR>
      <DD>virtual machine based OS's today in it's memory utilization.. such as 
      Linux.<BR><BR>
      <DD>If you think about it, it really makes sense.&nbsp; Linux knows 
      nothing from filenames.<BR>
      <DD>It knows Inode numbers (or index hash values in to the file descriptor 
      block.<BR>
      <DD>Same inode, it knows is same file, same code text.&nbsp; Different 
      inode, it knows<BR>
      <DD>nothing that the two programs running in memory are the same 
      code...<BR><BR>
      <DD>This is what I would do. I would expect largely many of the server 
      admins do indeed<BR>
      <DD>have their virtual server hosting set up similarly when it comes to 
      the COD executable...<BR><BR>
      <DD>I hope this help.&nbsp; My thanks to those that pointed at the recent 
      updates to mbuf()<BR>
      <DD>allocation via malloc(), and kernel references.<BR><BR>
      <DD>Dr. D<BR><BR><BR>
      <DD>At 10:45 AM 12/17/2004, Jay Vasallo wrote:<BR>
      <BLOCKQUOTE class=cite cite="" type="cite">
        <DD>OK, How do I do this usuing your method?<BR><BR><BR>
        <DD>----- Original Message ----- From: "Jay Vasallo" 
        &lt;jayco1@charter.net&gt;<BR>
        <DD>To: &lt;cod@icculus.org&gt;<BR>
        <DD>Sent: Friday, December 17, 2004 9:30 AM<BR>
        <DD>Subject: [cod] Dr. D - This ones for you.<BR><BR><BR>
        <BLOCKQUOTE class=cite cite="" type="cite">
          <DD>Dr. D Wrote:<BR><BR>
          <DD>"Because 10 servers your way will load 10 copies in to swap, 
10<BR>
          <DD>copies in to memory, etc.&nbsp; Using the method of symlinks, 
          which<BR>
          <DD>is really nothing more than a link in the super block.&nbsp; The 
          super block<BR>
          <DD>maintains all information about which disk blocks belong tio 
          which<BR>
          <DD>files.&nbsp; For your simlink the new file entry simply gets the 
          same<BR>
          <DD>inode id copied to the table.&nbsp; Same inode, same code... 
          With<BR>
          <DD>shared libraries in memory,&nbsp; for the 10 servers only 1 
          copy<BR>
          <DD>exists in swap. Only 1 copy exists in memory.<BR><BR>
          <DD>I hope this is more clear."<BR><BR>
          <DD>Dr. D<BR><BR><BR>
          <DD>Can you please explain this a little further:<BR>
          <DD>Lets say I have my games in:<BR>
          <DD>/games/cod-server/coduo_lxded<BR>
          <DD>and the useres at:<BR>
          <DD>/home/user/cod-server/uo<BR><BR><BR>
          <DD>How does help this help this situation.<BR><BR>
          <DD>Thanks 
  =o)<BR><BR></DD></BLOCKQUOTE></DD></BLOCKQUOTE></DD></DL></BLOCKQUOTE>
  <DL></DL><BR>(snip)<BR><BR><BR><BR>
  <BLOCKQUOTE class=cite cite="" type="cite">
    <DL>
      <DD><TT>S1-------------------------------------------------------------------------------<BR>
      <DD>Mark J. DeFilippis, Ph. D 
      EE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
defilm@acm.org<BR>
      <DD>&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></DD></DL></BLOCKQUOTE>
  <DL></DL>S2-------------------------------------------------------------------------------<BR>Mark 
  J. DeFilippis&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></BLOCKQUOTE></TT></BODY></HTML>