Insimenator.org

Simmers' Paradise => Mac-Users Only Peer Support => Topic started by: BeosBoxBoy on June 10, 2007, 08:51:12 pm



Title: Getting past the 2000/11800 file limit
Post by: BeosBoxBoy on June 10, 2007, 08:51:12 pm
The Aspyr version of The Sims 2 in an un-patched state with no expansion packs has
a 2000 download file limit.  the only way to get past this is to update The Sims 2
with the latest game patch from http://www.aspyr.com/ (http://www.aspyr.com/)

After patching or after installing any of the expansion packs there is a problem that
develops between 11800 to 12000 downloads.  To resolve this you will need a programme
that alows you to see and edit hidden system files, such as OnyX (http://www.titanium.free.fr/pgs/english.html) or any similar software,
and root access.

Log-in as root. Start OnyX and tell it to display hidden files.
Finder will restart, wait until Finder has restarted and completely displays
before proceeding.
 
Go into Macintosh HD and find the folder etc and open the file rc.local in text,
create this file if it does not already exist.

Add these lines or edit them if you have something similar.

   sysctl -w kern.maxfiles=102000
sysctl -w kern.maxfilesperproc=100000
You must set kern.maxfiles 2000 higher than kern.maxfilesperproc.
If you need to have more files open, use a higher number, example:
   sysctl -w kern.maxfiles=202000
sysctl -w kern.maxfilesperproc=200000
Save the file to your desktop (uncheck if no extension is provided, use ".txt" format)
then move it into the etc folder.
Return to OnyX and restore the settings to not show hidden files. Restart the computer.

This should get you up and running with the best advantages.

Credits: sakgonz (TSR Forum); alexpilgrim; luws (TSR Forum)

Note: more discussion on this topic can be located on the TSR forum at this thread: http://forums.thesimsresource.com/showthread.php?t=309256 (http://forums.thesimsresource.com/showthread.php?t=309256)


Title: Getting past the 2000/11800 file limit
Post by: Mi-chii on June 11, 2007, 06:16:41 am
BBB, I have the basegame only, I have way more than 2000 downloads, and everything works completely fine. It's unpatched and working excellent. Just thought I'd add that :) Could be some have problems, and some don't.


Title: Re: Getting past the 2000/11800 file limit
Post by: lordtyger on February 11, 2017, 05:11:20 pm
in Yosemite and Newer versions of the Mac OS the method used to modify the Open Files Limit Has Changed. Use the instructions below:

Adjusting Open File Limits in Yosemite {and Later}.

To adjust open files limits on a system-wide basis in Mac OS X Yosemite, you must create two configuration files.
The first is a property list (aka plist) file in /Library/LaunchDaemons/limit.maxfiles.plist that contains the following
XML configuration:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
    <dict>
      <key>Label</key>
        <string>limit.maxfiles</string>
      <key>ProgramArguments</key>
        <array>
          <string>launchctl</string>
          <string>limit</string>
          <string>maxfiles</string>
          <string>65536</string>
          <string>65536</string>
        </array>
      <key>RunAtLoad</key>
        <true/>
      <key>ServiceIPC</key>
        <false/>
    </dict>
  </plist>

This will set the open files limit to 65536.
The second plist configuration file should be stored in /Library/LaunchDaemons/limit.maxproc.plist with the following
contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
    <dict>
      <key>Label</key>
        <string>limit.maxproc</string>
      <key>ProgramArguments</key>
        <array>
          <string>launchctl</string>
          <string>limit</string>
          <string>maxproc</string>
          <string>2048</string>
          <string>2048</string>
        </array>
      <key>RunAtLoad</key>
        <true />
      <key>ServiceIPC</key>
        <false />
    </dict>
  </plist>

Both plist files must be owned by root:wheel and have permissions -rw-r--r--.
These permissions should be in place by default, but you can ensure that they are in place by
running sudo chmod 644 <filename>. While the steps explained above will cause system-wide open file limits to be correctly set upon restart, you can apply them manually by running launchctl limit.

Easiest way to create the files named limit.maxfiles.plist and limit.maxproc.plist is to just copy and paste the xml code into a text file and save with the correct name and file extension.


Note: Once you have made your plist files and placed them in Library/LaunchDaemons you Must change the owner and group for the two files. Also you need to make sure that the files have the correct permission settings.

Terminal commands to do this are:

sudo chown root:wheel <PathToFile>
sudo chmod 0644 <PathToFile>

Probably the easiest way to enter the <PathToFile> would be to type the commands followed by a space and then drag the file into the open Terminal window and hit return.

You will be asked for your admin password the first time and when you type it you won’t see any typing. Just hit return when you are finished entering it.

=*=*=*=*=*=*=*=*=

In addition to setting these limits at the system level, it is recommended, (but not required) that you set the limits at the session level as well by appending the following lines to your bashrc, bashprofile, or analogous file:

Shell
ulimit -n 65536
ulimit -u 2048
Like the plist files, your bashrc or similar file should have -rw-r--r-- permissions.
At this point, you can restart your computer and enter ulimit -n into your terminal. If your system is configured correctly, you should see that maxfiles has been set to 65536.


SimplePortal 2.1.1