PDA

View Full Version : Increasing memory in applications and performance



09-15-2001, 08:16 PM
Myth or Fact

A very long time ago a friend told me to increase the memory allocation for each of my "application programs" as long as I had enough RAM. I have been doing it ever since. It made sense it was supposed to "make things run a little smoother maybe faster - better anyway"

I have increased my application programs memory size by 30 to 100 percent depending on the app.

Comments http://macgurus.com/infopop/emoticons/icon_smile.gif

Thanks
Randy

mactheripper
09-15-2001, 09:09 PM
You want to check the way the app uses memory first, unless you have Mag-like quantities of RAM lying around...

Older apps typically used a max amount of RAM set in the Get Info box, and increasing it meant more windows, better performance, and better overall stability. With Systems 7 and 8, the system itself began to offer the capability to use dynamic system heap memory, without changing the max set for the program. Certain programs therefore do not really benefit from upping the max allowable in the Get Info --> Memory box.

BBEdit is one example of this. It slurps system heap memory to open additional windows, since you don't want to change the memory allocation every time you decide to open a hundred windows and do a Batch Search and Replace. (Who in the world would be doing that? Me.)

In general, I do find that increasing the max size does make most programs run smoother.

greg_w
09-20-2001, 02:43 PM
rwm,

Opening the app's info window displays the three memory settings of: minimum, suggested, preferred. (as you know) Changing the "preferred" setting does help on most programs. I find that the default "minimum" and "preferred" settings are ridiculously low. Photoshop, for example, comes set at 20M. Hardly useable at that memory setting. But you don't have to be using memory hungry apps like PS, Internet Explorer benefits tremendously from more ram (as well as free ram).

The important things here are giving the apps enough memory for speed , leaving plenty of free memory and stuffing as much memory as possible into your Mac. Hey, ram is cheap now, get as much as you can.

gw

lasvegas
09-21-2001, 01:19 AM
Photoshop, for example, comes set at 20M. Hardly useable at that memory setting.

This may have been true with older versions of Photoshop. Currently, 6.x come preset to the suggested size of about 44MB and shouldn't be changed. Photoshop has its own technique of using spare, unused memory as well as a very efficient Scratch (aka Virtual Memory) system.

ricks
09-21-2001, 02:22 AM
lasvegas,
Are you saying that with a fully populated G4 it does't do any good to up the memory, goes against all we've been told over the years. I've been doing it, but have to admit I have never run any significant testing to see if it mattered.

What a trip!
Rick

lasvegas
09-21-2001, 02:33 AM
It all depends on the program really. When I write a program I do extensive testing and determine the optimal memory necessary for proper operation, this is what I set the Suggested Size and Preferred Size to. I also determine what the absolute minimum memory my program will run without getting the old System Error 25 (Out of Memory) and set the Minimum Size to that. So for reference, you normally will never have to change the settings on ClipDragon¨Ű -- This was an Unsolicited Plug! http://macgurus.com/infopop/emoticons/icon_smile.gif

PhotoShop 6 also falls into this category. Adobe created a whole new way of handling memory very efficiently and should work well with no modifications.

ricks
09-21-2001, 12:34 PM
lasvegas,
I wasn't very clear, I was referring to Photoshop, however I have been guilty of upping RAM past any useful amounts out of ignorance for all sorts of programs.
Netscape with its ram leak problems.
Games, that seem to run out of ram at the most inconvienent times.

Mostly though, Photoshop, for speed(imagined maybe). I always thought if you gave Photoshop enough ram it would be able to do its thing in ram.

Would it be better to use a ramdisk with the extra ram and use that as a scratch disc to speed up Photoshop or just leave it alone?

Rick

PS. I see that you responded last night 10 min after I posted, sorry I missed that . My wife yelled that 30 wild pigs were ripping up the back lawn. Exciting for a little while.(wish I could post a photo)

[This message has been edited by ricks (edited 21 September 2001).]

[This message has been edited by ricks (edited 21 September 2001).]

09-21-2001, 01:57 PM
Yes

I too am guilty of increasing my "memory for every application" via Get Info -> Memory.

I have always been told give them apps some "headroom"

So this might not be the best thing for performance.

I recently upped LimeWire's memory and it seems to have slowed it down?

So is this wrong? really bad? maybe helpful? sometimes helpful? All of these right. Depends on the app.

More comments?

Randy

lasvegas
09-21-2001, 06:12 PM
Yes rwm. All of them. It all depends on the program.

Concerning Photoshop, ricks¨÷ If you're working with 6.x, it would do no good to increase the memory. Any unused memory is automatically taken advantage of by Photoshop in a much more efficient manner than putting it in the Application Heap (Increasing Preferred Memory). I recommend to clients to use a dedicated empty partition or smaller (2-4GB) drive for Photoshop Scratch. Usually, when I upgrade a client's system with a bigger drive, I transfer everything into the new drive, erase the old one and name it "Scratch" for just this purpose.

ricks
09-21-2001, 07:57 PM
lasvegas,
Thanks!
I very much appreciate the insight into mem management. Never even considered it before. You just blew me away.
Rick

09-21-2001, 08:33 PM
Me to http://macgurus.com/infopop/emoticons/icon_smile.gif

Randy

gmidd
02-04-2002, 10:07 AM
You guys, this very interesting....
I, like many others,have gone with protocol of generally increasing all my big apps minimum and preferred memory allocation- some of them by huge amounts. And ditto for various CP's...
But I have noticed a curious phenom. with the "About this Computer" panel open, showing the open apps memory use. With some apps, the total bar length stays the same and the dark portion increases or decreases with whatever usage.
But with the system bar and certain other applications, the total bar length is usually all dark and increases or decreases in length with whatever the system or those particular apps are using for memory. This I take it, is the dynamic allocation...

I know many people recommend giving Exploder large amounts of RAM. But this seems to be one of those apps doing the dynamic thing. Others, from my observation, include Acrobat 4, and Appleworks 6.


[This message has been edited by gmidd (edited 04 February 2002).]

dragon_x
02-04-2002, 01:36 PM
I generally increase all the RAM allocation in various applications. I would like to see a speed test running PS6 on the default RAM and on user adjusted RAM. I think I remember that tests in the past always showed Photoshop benifited from additional memory - allocated in the GET INFO window.

I think Graphic Converter can use dynamic memory, but it does seem to stress more (crash) when you push this.


------------------
I'm back!

gmidd
02-04-2002, 06:45 PM
OK, I made some systematic observations of the "About this Computer" window in action.
First, I set the 'preferred size' and 'minimum size' memory allocation of the following apps to the same as the default 'suggested size':

MS Internet Explorer 5.1: 11792K
AppleWorks 6.1.2: 13450K
Eudora 5.1r: 5686K
Netscape Communicator 4.79: 15029K
Acrobat Reader 5.0: 16414K
Acrobat 4.0: 19559K

Then I opened all of these apps, stayed online, and proceeded to open as many windows and menu options in each- all the while keeping the "About this Computer" window in view.
I must have had 10 -15 open windows each for both Netscape and Explorer with multiple web sites loaded; I even did a web page in Composer and a dowload from the Download Manager in Explorer, while writing an email in Communicator. I opened all available windows in Eudora, checked and sent mail at the same time, and generally tried to have as many things going on at the same time....
I made a pdf in Acrobat and did multiple searches in Acrobat Reader with all this other stuff going on but could not seem to use up either Adobe app's available allotment.

What I observed was, with the exception of AppleWorks- which contrary to my earlier assertion stalled and gave mem. warnings when I tried to do multiple megabyte-sized paintings- each of these apps appeared to increase their memory usage dynamically: Netscape I had up to 27 MB, Explorer around 13.5 MB, Eudora approx. 8 MB. In each of these, there always seemed to be a small portion of 'white' space to the right of the dark part of the 'memory bar', even as the total bar length would expand and contract with various operations.
Of these 3 apps, only Commmunicator felt logy at any time, at around 25MB.
I had the system memory bar at almost 120 MB- normally, it hangs out at about 80 for my setup.

My question is this: do some apps respond dynamically as in the above, and yet, can they also benefit from a larger 'preferred size' allocation? ie: Communicator..(At this point, I'm not so convinced that Exploder needs big amounts of memory, but what do I know?)

Or- put another way: are there 3 classifications here?-
1) apps that need upward manual memory adjustment for better operation, like Appleworks and older versions of Photoshop..
2) apps that grab the necessary memory dynamically and cannot benefit from manual adjustment, and
3) apps that grab the necessary memory dynamically but can also benefit from upward manual adjustment...

George



[This message has been edited by gmidd (edited 04 February 2002).]

lasvegas
02-04-2002, 10:45 PM
Actually there are a few more classifications then those. When a program is running, and needs memory, it has two or more choices. Use its own if available, dynamically use the System heap, use temporary files on the hard drive or execute some sort of virtual memory.

Programs like Explorer and Netscape use the first three techniques. The problem with browsers is the plug-ins. There are no rules as to how the plug-ins use memory. They usually just take it from the parent application and expect all to be well. This is why it's necessary to increase the Preferred memory for your browsers when plug-ins are added.

Word and Data Processor applications usually use their own memory and when that runs low, temporary files. Of course, real memory is a real plus and increasing Preferred Memory on these programs will normally improve performance.

Utilities usually have a set procedure for doing things and don't normally need more memory. The exception to the rule is those utility programs that need to process a great deal of data such as defragmenting programs working on modern drives considerably larger than the original programmers imagined would be used.

Modern Adobe programs use Abobe's own memory technique of overriding Apple's Memory Manager and "borrowing" any unused memory available on the system. When that proves insufficient, then their own Virtual Memory technology is used in the form of Temp files on the hard drive. It does no good to increase the Preferred memory in Adobe programs and actually would deter its performance. Adding more real RAM to the machine is the best performance boost you could give Adobe programs. Also, in the event that VM is needed, a dedicated "Scratch" drive or partition is most recommended.

mactheripper
02-05-2002, 01:54 AM
Another brilliant post from lasvegas. He has clarity like Waterford crystal.

I bow in his general direction. Read everything there very carefully.

My two drachma:
1) Games like Quake3, Oni, anything with 3D: set their preferred RAM to everything you've got. Like, 120 MB+. They use it to load level files, and real RAM is faster than data on disk.

2) Internet apps, notably Netscape and IE, dynamically grab more RAM from the system for each window open, so increasing their maxes CAN be good if you routinely run 6-12 apps simultaneously. IMHO, it noticeably increases system stability. However, as lv points out, it's the plugins that really tend to florf the browsers. Since Flash, Shockwave, and certain file decoders tend to get used in spurts, the memory situation can get shaky quickly. If all you're viewing is MacGurus, you can probably open 40 windows without crashing. Please, somebody try this...

crazyeights
02-05-2002, 02:59 AM
Heh. http://macgurus.com/infopop/emoticons/icon_smile.gif

IE 5.0 (2022)

Minimum + suggested size: 7634K

Preferred size 11MB (11264K) Kicked me into MacsBugs after about 26 copies of this thread, getting progressively less responsive as it went past 10 windows. IE grabbed about 23MB of available memory, before it puked into macsbug.

Reset IE to 40MB (40960K) minimum and preferred, and repeated operation. 46 pages as fast as I could pop em open. I had to yawn real bad, so I quit the test........

http://macgurus.com/infopop/emoticons/icon_biggrin.gif

[This message has been edited by crazyeights (edited 05 February 2002).]

gmidd
02-05-2002, 09:30 AM
So I take it then that the Mac OS Memory Manager attempts to actively 'help' any open app finding itself with insufficient resources, by either allowing it (as in the case of modern Adobe apps) to grab memory from the system heap, or actually telling it to take more...but otherwise stands by without interfering when an app's 'preferred size' is sufficient...
And that some apps are unresponsive to this treatment and must be given previous instructions (by setting 'preferred size'). 'scuse the anthromorphism! http://www.macgurus.com/ubb/eek.gif

Judging by c8's comments, one should set the 'minimum' and 'preferred' sizes the same?

gmidd
02-05-2002, 07:57 PM
I just found this nifty little utility called "Memory Mapper"(freeware). It graphically displays both physical and virtual memory usage in a more comprehensive and detailed fashion than the "About this Computer" window...
http://www.pure-mac.com/diag.html

mactheripper
02-06-2002, 12:09 AM
In answer to your question, you don't have to make the min and preferred sizes the same. If enough RAM is available, the system will allocate the preferred amount when launching the app. If not, it will allow as much as possible down to the minimum size.

That's only for launch. Then, if the app starts needing more, it may be able to request it from the system heap/etc., if it is written to do so. Or it could just crash.

lasvegas
02-06-2002, 05:23 AM
Also, Adobe aps aren't "allowed" to use memory as they do; They bypass Apple's Memory Manager to do it. System Heap space is limited to only the memory between System and Finder. Remember when sound died shortly before the infamous System Error 25? This was the System Heap purging itself to make more room. Fortunately, Mac OS 9 made a few changes allowing Finder to relocate itself to dynamically increase/decrease the System Heap. Adobe products "borrow" all of the unused memory for it's own use and monitor's Apple's Memory Manager activities so that the memory is available to it when needed.

gmidd
02-06-2002, 11:09 AM
Thank you lv, c8, mtr, and the others for the excellent info- http://macgurus.com/infopop/emoticons/icon_smile.gif

ricks
02-06-2002, 11:58 AM
lv,
You are amazing.

You ought to consider doing some of this tech stuff for a living. http://macgurus.com/infopop/emoticons/icon_smile.gif
Rick

rwm
02-07-2002, 12:27 AM
He sure is helpful. Thanks lasvegas. Randy

lasvegas
02-07-2002, 04:01 AM
It's precisely what I do for a living. Have been for 23 years now. "Super-Computers were just a bit larger then! http://macgurus.com/infopop/emoticons/icon_smile.gif

greg_w
02-15-2002, 07:26 PM
LasVegas,
I read your posts and you sound quite reasonable. But what you are saying flies in the face of years of MacOS tips. Especially regarding the graphics apps like Photoshop. In addition, it doesn't work in the real world as far as I can tell.

For example, on the following system: G4 867/1.5g ram/stock 60g HD/OS 9.2.2/ Photoshop 6.0.1 and no other apps running, I set P6's ram allocation to the "suggested" size. I opened an 80 meg eps file. It opened very slowly and even threw up a progress bar. Then I resampled from 340dpi to 600dpi (80 to 260 megs). Photoshop hung about half way and I finally stopped it after a minute.

Then I set Photoshop's memory to 600 and tried again: no progress bar on opening and the resample happened in 20 seconds.

Next, for variety, I directed photoshop to make a web gallery from a folder with 50 tiffs that were between 10 and 14 megs each. That took just under three minutes with 600 megs ram allocated and a bit over 12 minutes at the suggested 45 megs.

So, I don't get it. Am I missing something? Because it sure looks to me like increasing the ram allocation helps in a big way. I am always interested in getting my systems to run smoother and faster so please explain to me how this fits into what you have been saying.

Greg

gmidd
02-16-2002, 10:59 AM
PS is a funny duck!

Aside from the question of the change in Photoshop 6 regarding RAM usage, the 'scratch disk' thing is also somewhat of a mystery. I've read everything I could find on the Adobe websites, in the Photoshop application help, the pdf manuals, etc on PS's 'virtual memory' memory scheme. According to Adobe, if you allocate enough RAM to PS, it doesn't need to use a designated scratch disk..However, in tests with a 5mb file and 100mb allocated to PS, I find, after a level tweak on a photo, a 32mb temp file on my designated scratch disk. This is with PS showing 100% efficiency in doc window!

I did this test using Photoshop 5.0 Limited Edition, so maybe this particular version does things differently than the full editions- I don't know.

Not to trying to change the subject here, but this does seem to relate to the RAM thing in some way...

greg_w
02-16-2002, 02:21 PM
Yes PS is an unusual app in it's use of memory. That is partly because, unlike the old Live Picture, it is not working on a proxy view but the entire real file. PLus, no matter how much ram you have given the app it always writes to the scratch disk. That temp file helps PS to provide that great history/undo stuff and has an impact on performance. The best resource for information on the use of PS, I think, is the excellent Photoshop Bible written by Deke McClelland. (published by MacWorld)

Despite what Las Vegas claims, I find that all the big graphics apps ( Photoshop, Illustrator, InDesign, XPress, Flash, GoLive, Director etc) all benefit from an increase in the memory allocation. That is also true of print monitors, RIP software, audio sampling apps, and scanner software. As a Photogapher/Art Director/Web Designer I use all the above apps on a weekly, and sometimes daily, basis. Whatever the theory about the memory usage is, real world results are are just that: real.

This, of course, will all be a moot point as soon as all the graphics stuff is carbonized and we can leave the manual memory allocation of the classic MacOS behind for OSX.

Greg

lasvegas
02-17-2002, 05:55 AM
You're right. I stand corrected. Adobe's use of additional memory is a feature of its virtual memory scheme if needed. Giving Adobe programs more memory would eliminate the need for VM as long as the program, and open files don't require it. The Scratch disk will continue to be used though, for the purpose of the Undo function.