Jump to content

Mac, Wine, and TS3’s Memory Management


Recommended Posts

even though Mac’s OS X in more recent years (and systems) has become a lot smarter with both system and program memory management, it still faces problems when running older applications.
if i’m not wrong, The Sims 3 was released simultaneously for Windows, Mac, and the iPhone/iPad franchise in June, 2009. a lot has evolved since then; yet, us Mac users have — for the past decade — faced problems other OS users haven’t.

 

The Wine Wrapper: Cider

 

Mac’s TS3 version is essentially the Windows instalment running inside a wrapper based on Wine Technology called Cider — an app that translates Windows system calls into POSIX-compliant system calls, recreates the directory structure of Windows systems, and provides an implementation of Windows system libraries.
therefore: while The Sims 3 runs relatively well on Mac, it wasn’t developed as an OS X native application; as a result, the game’s memory management is performed by Wine Cider — which has always done a lousy job at it.

 

regardless the amount of RAM memory your Mac has: when running, TS3 allocates by default a maximum of 2GB of RAM. if you have Mods and CC installed as well as more than the six first Expansions Packs (World Adventures, Ambitions, Late Night, Generations, Pets, and Showtime), then these 2GB will not be nearly enough: after 30 to 60 minutes of playing — if not before — the game will begin to lag, and things will tend to get rather splenetic after that.

 

two things can be done in order to avoid or at least minimise this issue:
A. change the game’s Initialization parameters in order to allocate more RAM (works only if your computer has at least 8GB of RAM), and ;
B. help Wine manage the in-game RAM usage and memory caches.

 

it took me about five years to fine tune my game so not to suffer from [too much] lagging and crash issues. since i do not know your computer model and specs, your TS3's configuration parameters, and which Mods/CCs you have installed, i cannot guarantee the procedures below will actually work for your game. hence: if you do follow them, you are at your own risk.

that said, i suggest you read this series of steps at least once to get acquainted with them.

 


A. Changing TS3's Initialization Parameters

 

to do so, you’ll have to have a minimum knowledge on how to access an application internal files on your Mac.

 

1. go to your The Sims™ 3 folder inside your Applications Folder (to access the latter from the desktop, press the keys [SHIFT]+[COMMAND]+[A] simultaneously);


2. Right-Click the app “The Sims™ 3” (the actual The Sims 3 Base Game) to access its internal files;

 

3. while Right-Clicking, select the option "Show Package Contents;" you should access a folder entitled "The Sims™ 3" containing a subfolder named "Contents"  —> Double-Click this subfolder to open it —> Double-Click the “Resources” subfolder —> then the “transgaming” subfolder —> then the “c_drive” subfolder —> then the “Program Files” subfolder —> then the “Electronic Arts” subfolder —> then the “The Sims 3” subfolder —> then the “Game” subfolder —> then finally the “Bin” subfolder;

 

4. you should by then be at the heart of The Sims 3 Base Game. Click once on the file Sims3.ini and press the keys [COMMAND]+[D] simultaneously in order to have it duplicated;


1389860907_TopicLL01pic01.png.bcb6ba5681ab988aa6d8cf1b845815c0.png


5. the resulting file, Sims3 copy.ini,  should be renamed to something different — e.g. Sims3.old, Sims3.bak, etc. make sure you keep it inside the Bin folder in case you need to use it again;

 

6. open the original document (Sims3.ini) with a text editor such as TextEdit or Atom — a great Open Source Text Editor for Mac developed by the peeps from Github that can be downloaded here;

 

7. find the line below the one written [ResourceSystem] (in my system it’s line 14; i believe it should be the same on yours);

 

8. the value described as MemoryUsageLimit is 20000000;

 

349177827_TopicLL01pic02.png.5e6b0cbb25c2ddda02d5c7dc08f50a0b.png

 

9. change this value to half the amount of your total RAM — e.g. if you have 8GB on your Mac, then 40000000; if you have 16GB, then 80000000;

 

1203878083_TopicLL01pic03.png.80f5e54f778bfe3b48954e8fcbe72449.png


10. save the document by pressing the [COMMAND]+[S] keys concurrently;

 

11. quit the Text Editor and close the folder.

 

if you ever need to restore the old value, you may:

 

1. repeat the process then retype “20000000” after “MemoryUsageLimit” and save the document, or;


2. trash the file Sims3.ini then rename the backup file to “Sims3.ini.”

 

we are done for now; run The Sims 3 and see how it functions.

 

 

B. Helping Wine Cider to Manage the In-Game RAM Usage and Memory Caches

 

there are several ways to help the wrapper to manage the in-game memory; the easiest, i believe, is to use Mac’s Terminal to flush the unused memory from RAM and to clean the disk caches.
to do so:

 

1. while playing a full-screen game, if you perceive it is slowing down or beginning to lag, pause the game then press the keys [COMMAND]+[TAB] simultaneously to hide The Sims 3 and go to the desktop; if playing TS3 windowed, just pause your game and press [COMMAND]+[H] concurrently to hide it;


2. when in the desktop, press the keys [SHIFT]+[COMMAND]+[U] simultaneously to go to the Utilities Folder;

 

3. find the app “Terminal” and Double-Click it. when it opens, you should have a screen similar to this:

 

460420064_TopicLL01pic04.jpg.cf91cac34890209bd5a17ed0005d3c5a.jpg


4. if your system is equal to or greater than OS X 10.9, type “sudo purge” then hit the [ENTER] key;


1966999733_TopicLL01pic05.jpg.d4562c55c78c63067b66e98c924354c0.jpg


5. you will then get a prompt asking you to type in your password;

 

871281382_TopicLL01pic06.jpg.efc6bda2f8594a0c46cbbd08ad113584.jpg


6. do so. for security reasons, Terminal won't neither show your password nor echo its characters with the “•” symbol;


7. when you're done typing, hit the [ENTER] key again. Terminal will take somewhere between 5 to 15 seconds to purge all unused memory and caches, during which your computer will be frozen;

 

8. when the process is finished, press the keys [COMMAND]+[TAB] and use the [RIGHT ARROW] or [LEFT ARROW] to get back to The Sims 3. with the game selected, as soon as you release the [COMMAND]+[TAB] keys, you should be back to it.

 

 

The Purge Memory Script App

 

since some people — due to their lack of familiarity — is not comfortable using Mac's Terminal, i wrote a little script app that calls the same “Purge” process above but echoes the password characters. it's available for download below:

Purge Memory.zip

place the.zip file on your desktop and decompress it there.
to have it open, Double-Click the file.

 

52111154_TopicLL01pic07.png.f785b234d061241fdc71f606f79ddd89.png

 

i changed my username for obvious reasons :); nonetheless, your username should appear on the top field and the text input should be on the Password field below.
just type your password, hit the [ENTER] key, and wait for the process to finish.

 

 

Conclusion


should you have any questions regarding THIS issue — Mac, Wine, and The Sims 3 Memory Management — feel free to leave a reply or to PM me; be sure i’ll be more than willing to assist you. nonetheless, for specific TS3 and/or Mods/CCs issues, i’m sure there are people here and in other forums a lot more capable to help you.

 

thanks for reading and for your positive input.

 

 

cheers.

Link to comment
On 5/7/2019 at 6:50 PM, ZenBuddhist said:

8. the value described as MemoryUsageLimit is 20000000;

It may well have some effect on the Mac version. For Windows, however, this setting has been useless since patch 1.17. Since that patch version, the game will use as much memory as the system will let it, up to a max of around 3.4 GB. The sims 3 is a 32-bit application, and cannot address more than that.

Link to comment
8 hours ago, FreakyRufus said:

It may well have some effect on the Mac version.


hey, Rufus,


thanks for the input.

it does, actually. since it is the wrapper Wine that also handles memory (badly, i should say), and it creates its own set of dependencies when running an originally-written Windows app, the more RAM the Mac user allocates to the app itself, the more memory Wine will try to assign to it. ultimately, however, OS X will determine which takes what.

as i put on the thread: because TS3 wasn't rewritten and recompiled for OS X, it isn't a true Mac Application. what us (Mac users) have is a Windows game running on [an outdated version of] Wine.
from personal experience: i at times play TS3 for a couple weeks in a row using this modification and the memory purge technique, having all sorts of apps also opened and running. even though NRaas Error Trap does get lots of issues, ? TS3 itself doesn't give up.1


thanks again.


cheers,

 

 

edit: 1 i also save the game a lot — actually every 12 sim-hours — and get no infamous error 12 issue.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use