Jump to content

performance tweaks?


Recommended Posts

I started the italian campaign in CMFI recently and made it through to the 4th battle (Gela outskirts, "A day at the beach"). Other than the previous battles, i cant run that one with playable FPS even on fastest/fastest settings. Probably the cause is the complex terrain, i had been able to run battles of similar size on plain terrain in CMBN 2.0 (like "Wittmans demise") with low but playable fps. Now since i would really like to finish the campaign, i thought i might ask on the forum if there is anything else i could do to just get another 10-15 fps. Currently i have like 5 and anything below ~25 would be unacceptable. I wwould rather start the german campaign than of playing that battle with 5-10 fps.

EDIT: system specs: Nvidia 8800 GTS 320MB, Intel dualcore 3,0 GHZ, 1GB RAM, XP SP3

Link to comment
Share on other sites

Have you turned off shadows, shaders, etc.?

Also, is it a very large map? I've found that huge maps can overwhelm your memory if you have loaded any other scenario before the big one. Always close CM and then restart it before loading a large scenario.

Link to comment
Share on other sites

Make sure you have all other applications shut down before launching CM. One of the problems of "multi tasking" operating systems is we are often unaware of what resources other programs are chewing up. On the Mac, for example, Safari can consume vast quantities of RAM if left open over a long period of time or after heavy (graphically intensive) use. I had instances of it having consumed nearly all of my RAM not being used by the OS.

Best of all solutions is to reboot, launch only CM, and play from there. This also cleans out various junk that might slow down performance. I do this myself because I tend to keep my computer on for several days straight, which means I'm prone to "clutter" that absolutely negatively affects performance. Rebooting is like working with a totally different computer. And not just for CM!

Steve

Link to comment
Share on other sites

Make sure you have all other applications shut down before launching CM. One of the problems of "multi tasking" operating systems is we are often unaware of what resources other programs are chewing up. On the Mac, for example, Safari can consume vast quantities of RAM if left open over a long period of time or after heavy (graphically intensive) use. I had instances of it having consumed nearly all of my RAM not being used by the OS.

Best of all solutions is to reboot, launch only CM, and play from there. This also cleans out various junk that might slow down performance. I do this myself because I tend to keep my computer on for several days straight, which means I'm prone to "clutter" that absolutely negatively affects performance. Rebooting is like working with a totally different computer. And not just for CM!

Steve

As I recall one of the things you Mac guys bragged about years ago was that Mac didn't require you to reboot as often as Windows. Is that no longer the case :P

Link to comment
Share on other sites

As I recall one of the things you Mac guys bragged about years ago was that Mac didn't require you to reboot as often as Windows. Is that no longer the case :P

A quick look into top(1) and exiting or killing memory hogs will do, too.

Modern web browsers have enormous appetite for RAM and essentially behave like they are alone on the machine.

Of course you could also give the box enough RAM to actually run your workload :D

Link to comment
Share on other sites

Now since i would really like to finish the campaign, i thought i might ask on the forum if there is anything else i could do to just get another 10-15 fps. Currently i have like 5 and anything below ~25 would be unacceptable. I wwould rather start the german campaign than of playing that battle with 5-10 fps.

How critical, really, is a robust FPS rate when playing WEGO on a typical map? Realtime's another matter.

Link to comment
Share on other sites

...1GB RAM...

Lots of good advice so far in this thread, but I think your problem is simply not enough RAM. I've noticed that on my Mac that if I have less than 2GB of free memory, problems will arise. And before I added an additional 8GB, what I had on hand was 4GB. Out of that 4GB, for me to get a usable amount of memory, I had to quit all other apps and restart my computer. So far, I haven't had to do that, but I am concerned that having other apps open might be putting some extra load on my CPU, so I plan to start watching that when I have CM open.

Michael

Link to comment
Share on other sites

Lots of good advice so far in this thread, but I think your problem is simply not enough RAM. I've noticed that on my Mac that if I have less than 2GB of free memory, problems will arise.

Agreed, 1 GB RAM is hardly enough to run the OS and an app or two, although you are on XP, which is lighter on memory than Vista or Win 7/8.

Add in Virus scanners, and other background stuff in Windows, and you're looking at probably less than half a gig available. Task Manager can give you an idea of what is running, and what is available BEFORE you load CM, that's the number you want to be concerned about. Kill whatever you can to free RAM before running CM.

Thankfully, system RAM is becoming less expensive than it used to be. The 320MB of video RAM is on the low end nowadays, but should be playable, frame rate is also a function of horsepower in the video card, and I'm not that familiar with the nVidia 8800 GTS chipset. The G80 chip was a good one for its vintage (~2006).

Link to comment
Share on other sites

Thanks for all the good advice. I just ran a test and i was able to gain some FPS by doing the following:

- I killed all unecessary processes in the task manager. Background processes were reduced from 44 to 32, almost 150 mb of memory saved in total.

- Reboot before playing.

- I went to the Nvidia UI panel and chose to enforce the most performance orientated settings (this reduced texture quality notably).

- I removed all of Aris beautiful textures, explosions and smoke from the Z folder.

- Turning of shadows and shaders.

FPSes are now between estimated 15 max to 5 min. Thats a significant improvement compared to estimated max<5 as it was before. I think i could play the battle like that :).

Something else i will probably try is to load a savegame and replay the 3rd battle of the italian campaign. In the mission briefing of the 4th battle it says i will be facing the remants of the 3rd and 2nd battles along with another battallion. Now since i chose to bypass the battlion that lay ahead me in the third battle without inflicting lots of casualties (the mission was to exit my forces on the opposite edge of the map, not to engage with the enemy decisively), the opposing forces in battle number 4 are now made up of ~2 battallions instead of just ~1.

Link to comment
Share on other sites

As I recall one of the things you Mac guys bragged about years ago was that Mac didn't require you to reboot as often as Windows. Is that no longer the case :P

Still the case for most people. It's the stupid web browsing that really frigs things up. Quitting your browser, but not rebooting, does address most of the problems. However, if you are routinely running into speed problems then rebooting is always a good thing to do.

For me quitting Safari generally cleans things up nicely. But it's good practice to reboot every few days just to be on the safe side. Though it is better to shut down every day anyway to save wear and tear on the computer as well as save on electricity.

Steve

Link to comment
Share on other sites

For me that didn't seem to be enough as it would still leave 1GB or more in the Inactive category. I don't really understand that; I suppose it might be some way for the app to relaunch more quickly, but I don't really know.

Pretty much on the nose. Unfortunately OSX's policy for releasing Inactive memory (which is theoretically "Free" memory that simply needs to be requested) borders on the insane. It's pretty easy to end up with several gigs of Inactive memory while OSX pages frantically. There's very little that software developers can do about it.

So... in Apple's eyes, that 1GB of Inactive memory is "free". Just not, you know, when you might actually need it.

Link to comment
Share on other sites

Yeah, what Phil said. MAYBE the OS will release the memory when you need it, maybe not, maybe a little later. Phil and I had great fun with this back when the CMBN Mac Beta was being first tested. It was also when I discovered Safari's pathological intent to have everything you accessed cached even if it was from two days ago and some current process is starved for RAM. Annoying!

Steve

Link to comment
Share on other sites

Yerrrrrs. I stopped using Safari years ago.

As for OSX and memory management, Apple started off well using the BSD Mach kernel, and it was actually open sourced (Darwin). But then - I forget which iteration of OSX 10.n, they closed it up. I wonder how far behind the ball they really are now with their kernel in relation to other UN*X flavours.

Link to comment
Share on other sites

My bad, not BSD Mach, just Mach. I conflated BSD into it through a bad memory, due to it at one time supposedly destined to replace the BSD kernel.

edit - so, I take it then the kernel has been re-opened ? In 2006 Apple closed the kernel:

http://www.macworld.co.uk/mac/news/?newsid=14663

...the Intel edition of Apple's OS X is now a proprietary operating system.

Mac developers and power users no longer have the freedom to alter, rebuild, and replace the OS X kernel from source code. Stripped of openness, it no longer possesses the quality that elevated Linux to its status as the second most popular commercial OS.

...

Apple's retreat to a proprietary kernel means that all users must accept a fixed level of performance. The default OS X kernels are built for broad compatibility rather than breakneck speed and throughput. That doesn't matter at present, because all Intel Macs are built on the same Core Duo/Core Solo 32-bit architecture. But Apple's workstation and server will be built using next-generation 64-bit x86 CPUs. The chipset, the bus, the memory, almost everything about the high-end machines will be much advanced over iMac and MacBook Pro. Intel's road map plots a rapid course to ever higher performance. Macs will inherit the benefits of Core Microarchitecture's evolution, but OS X is limited in the degree to which it can exploit specific new features without creating branch after branch of OS code to handle each tweak to the architecture.

Users in demanding fields such as biosciences or meteorology do hack OS kernels to slim them down, alter the balance between throughput and computing, and to open them to the resources of a massive grid. The availability of Intel's top-shelf compilers, debuggers, libraries, and profilers create unprecedented opportunities to optimise OS X for specific applications.

Link to comment
Share on other sites

Getting back to the performance discussion. I've used Onyx now for a number of years. It has lots of handy maintenance routines bundled into a useful interface - unix scripts, permissions, cleanups etc. And it's free. Versions are available for every reasonably current version of OS X.

Quite handy and I use it every two weeks or so, and don't have any issues with my computer (MacBook Pro 15", 4 GB RAM, 1GB Graphics).

And my computer is pretty loaded up. Besides CMBN/CW/FI/SF I have numerous unix programs (for research work), Parallels Desktop with virtual machines for Window and Linux (also for work).

I can't recall ever getting equivalent of the annoying message "Windows has performed an illegal instruction.... OK?" - and when you click ok, the computer crashes and/or reboots. The worst I've had is a program becoming unresponsive and then force quitting it.

I use Chrome for my browser, mostly because it seems a bit faster.

Dave

Link to comment
Share on other sites

OSX uses Mach as the very base, including the virtual memory subsystem. The hardware device driver framework is home-grown by apple. All other operating system functionality is FreeBSD's, namely all the filesystem architecture and the networking.

The Mach VM system is essentially a bad performer, which also hurts other OSes that used it such as NetBSD. However, that's probably not the reason why you are seeing too much memory being used by web browsers.

The problem is most likely a result of the fact that most implementations of malloc are very reluctant to give back memory to the OS even after the application code gave it back to the malloc implementation. That is done for good reasons but they might not always apply. To make matters worse a lot of memory in a web browser is also taken up by Javascript code and the Javascript interpreter's garbage collector will also not always give back freed memory to the OS right away (it can't for performance reasons). This is all userlevel and the kernel can't do anything about it.

If you are using a web browser that uses tcmalloc (such as Chrome) then setting

$TCMALLOC_RELEASE_RATE to 5.0 or whereabouts will help a bit. Of course Chrome has other problems with wasting memory in the first place.

Link to comment
Share on other sites

I had a reminder tonight about reducing load on my MacBook Pro. I resumed debugging a project after a couple months, and wondered why there was a new glitch - it's an audio program, and there was a new 'splat' sound at random intervals, not frequent but enough to be annoying.

I increased the audio buffer, changed sample rates, still happening. I quit all programs, still happening. Checked the process table. And I see the agents for dropbox, sugarsync and crashplan are all running. I quit those, and the glitch disappeared. There was probably some kind of resource contention happening.

So there's another thing to try - many of us now run these agents that sit there in the top menu bar, and we can forget they are there waiting to grab some resources periodically. It won't make a massive improvement but every bit helps.

Link to comment
Share on other sites

There is one thing the OS can do is warn the user when the available RAM has dwindled down to a certain (low) level. This would alert the user that some decisions have to be made:

1. Specifically quit some applications/processes to free up RAM

2. Suffer performance consequences by not freeing up RAM

Instead OSes (all of them, I think) allow the user to bumble along and find things getting worse and worse from a performance standpoint. The intent is to shelter the user from having to deal with technical issues, but it really doesn't work. I don't know how many times it took my to get my mother to stop leaving a dozen applications open for 2 weeks. "I need a new computer!" is what my mom would say, and maybe that's the secret agenda of not telling people to just quit PhotoShop that hasn't even been used in a week since it was opened!

The same problem exists on mobile devices. We were getting some complaints from iPad users about CM Touch, for example. First thing we asked was "what other apps do you have open?". To which the customer said "I don't know. How do I find that out?". And after we told him how to check he inevitably said "three dozen" :D So we then say "quit those apps and see how it works". To which the customer would reply "how do I quit an app"?

While I do appreciate Apple's general approach to not bothering the user with technical issues, I do think it is detrimental to the user's overall experience to keep him ignorant of degrading performance through inefficient overuse of hardware capabilities. Fortunately, iOS 5 (or was it 4?) allows iPad users to easily check and quit out of apps. Makes our lives a lot easier.

Steve

Link to comment
Share on other sites

While I do appreciate Apple's general approach to not bothering the user with technical issues, I do think it is detrimental to the user's overall experience to keep him ignorant of degrading performance through inefficient overuse of hardware capabilities. Fortunately, iOS 5 (or was it 4?) allows iPad users to easily check and quit out of apps. Makes our lives a lot easier.

Hee hee, sounds like their plan is working: they continue to "not bother users with technical issues" and no one calls their customer support lines meanwhile they call yours :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...