Jump to content

Less memory usage by using OpenGL


Eisfunke

Recommended Posts

I would take what you see in the "Processes" tab in Windows with a grain of salt in regards to RAM savings with OpenGL.

I noticed something wasn't adding up when I swapped over to OpenGL. The Processes tab showed a savings of nearly 1.5GB RAM! Then, I looked over at my G13's display, and saw that my RAM usage was at 50% still (I have 8gb RAM), and on D3D it was at about 55%, what gives? I wanted to test to figure it out, and my data is below.

OpenGL:

Resting RAM: 1.40GB in use. (As determined by the Performance tab of Task Manager)

RAM after loading a blank sandbox(in Performance tab of Task Manager): 3.68GB in use.

Delta RAM = 2.28GB

KSP Process shows: 1,576,900KB

D3D:

Resting RAM: 1.41GB in use. (As determined by the Performance tab of Task Manager)

RAM after loading a blank sandbox(in Performance tab of Task Manager): 4.33GB in use.

Delta RAM = 2.92GB

KSP Process shows: 2,991,624KB

So as you can see, the game is still taking up a large amount of RAM from your system, it is just not showing up in the game's process.

EDIT* I did one more test, removing ATM completely and running the game with OpenGL. The results were even more off than with ATM.

OpenGL Without ATM:

Resting RAM: 1.37GB in use. (As determined by the Performance tab of Task Manager)

RAM after loading a blank sandbox(in Performance tab of Task Manager): 4.43GB in use.

Delta RAM = 3.06GB

KSP Process shows: 1,517,932KB

If you will notice, the KSP Process shows even lower RAM usage after taking out ATM, but the system RAM usage went up by .78GB.

Edited by WololoW
added data
Link to comment
Share on other sites

Is Resource Monitor more reliable than Task Manager? I certainly find it easier to use. In any case, both Resource Monitor and Task Manager show big RAM savings for me in OpenGL mode. I was getting out-of-RAM crashes in 32-bit until I switched to OpenGL; haven't had a crash since.

Link to comment
Share on other sites

I would take what you see in the "Processes" tab in Windows with a grain of salt in regards to RAM savings with OpenGL.

I noticed something wasn't adding up when I swapped over to OpenGL. The Processes tab showed a savings of nearly 1.5GB RAM! Then, I looked over at my G13's display, and saw that my RAM usage was at 50% still (I have 8gb RAM), and on D3D it was at about 55%, what gives? I wanted to test to figure it out, and my data is below.

You're absolutely right..

Based on Win8.1 Task Manager, by running OpenGL + ATM I saved roughly 1.60Gb, but calculating the percentages shown on my G510 (same applets as your G13) the savings are around 0.73Gb

Now, I know that Task Manager isn't very accurate, but I suspect Logitech's PerfMon isn't spot on either, if not worse than Task Manager..

My only "real" indication that "some" ram was saved is that KSP never crashed again and I did stuff it with more mods...

Link to comment
Share on other sites

FWIW the OpenGL flag does make for a more stable (and smooth!) KSP experience on my end.

But the overlaid indicators for my game video recorder (Raptr) cannot render.

I'm going to try a different GVR this weekend to see if it's only a Raptr issue.

Link to comment
Share on other sites

I have a Radeon HD 7870 and the following problem.

GL: disabling render-to-cubemap due to Radeon driver bugs

GL: disabling mipmapped render textures due to Radeon driver bugs

GL: Detected 0 MB VRAM

I figure there is no way around that. Game loads for a second then keeps flickering Black.

Link to comment
Share on other sites

found this thread by acident. ive done what you said but how do i know if it works how do u guys check the usage etc sorry i silly old monkey

Open the task manager (windows) buy pressing Ctrl+Shift+Esc (much like Ctrl+Alt+Del). Click the "Processes" tab, click "Memory" once or twice to see KSP.exe either near or at the top of the list.

The memory usage of KSP.exe is what you're looking out for, 1,700,000K is 1.7GB of RAM usage for example.

Link to comment
Share on other sites

Open the task manager (windows) buy pressing Ctrl+Shift+Esc (much like Ctrl+Alt+Del). Click the "Processes" tab, click "Memory" once or twice to see KSP.exe either near or at the top of the list.

The memory usage of KSP.exe is what you're looking out for, 1,700,000K is 1.7GB of RAM usage for example.

standby i will check , then maybe you can advise further on my crazy crashes

Link to comment
Share on other sites

I can confirm that using openGL works as advertised. My ksp is heavily modded, to the point where it no longer works at all when I run the game off of steam. It now crashes every time as soon as I load a save and dumps "out of memory" messages in the log. But using openGL, the game has so far never crashed. (fingers crossed) Task manager shows around 2.3gb. Hopefully this Unity 5 release they've been getting all excited about will also come with a more stable 64-bit. Seems kind of absurd that we have to deal with this problem in today's world of cheap and easy memory upgrades.

BTW. I think closing all internet explorer windows helps. I've seen it take up 500 MB or more at times depending on how many tabs are open and I think I've read somewhere that IE still defaults to 32-bit even on Windows 8.

Link to comment
Share on other sites

  • 4 weeks later...

I am using 32bit ksp with quite a few mods (enough to require using texture reduction in order to get ksp 32bit to load) and I had lots of trouble with crashing during scene changes, often accompanied by a log dump showing "Write to location 00800000 caused an access violation"

I would usually crash every third or fourth scene change.... (to vessel, to vab, to lauchpad, to space center.......)

I launch KSP using a desktop shortcut to a .bat file which then launches ksp.exe with a high process priority (not 100% sure if this gives physics calculations a boost or not)

start "Kerbal Space Program" /high "I:\Kerbal Space Program\KSP.exe"

I added "-force-opengl" to my target line in the shortcut and so far, I have not had a scene change crash for more than 8 scene changes

my memory usage for KSP and forcing open GL is currently 3.4GB according to the Resource Monitor, you can find this handy tool on Win 7 Pro x64 by ctrl+alt+del, selecting the task manager, clicking the "Performance" tab, and clicking the button near the bottom "Resource Monitor" The memory tab shows the working set in use by each process.

Vessel switching seems to be much faster and i managed about 10 vessel switches before a bug forced me to restart ksp (bug locked me to my current vessel, i could to go to space center, switch vessels, or quickload. But I was able to quicksave....) BUUUUTTTT 10 vessel switches is 2-3 times more than usual before a scene change crash, and I have seen the vessel locking bug before... maybe that one is due to one of the mods......

Link to comment
Share on other sites

I've been using OpenGL for about three weeks. Memory Use has gone from 3.2GB to 1.8GB with no crashes. The only issue I've seen so far are Window issue (which alt-Enter seems to fix) and a low frame rate when using rovers (although not so bad as to be unusable).

Link to comment
Share on other sites

Sigh.... I don't know why people don't just play the Linux 64bit version... It's really easy to install, you can keep windows at the same time, and you don't have to worry about using ram... All you need is 10GB of disk space. I run 50 mods, all my graphics are on max, and I use about 4.5-5GB of ram with KSP, and it never crashes...

Link to comment
Share on other sites

Sigh.... I don't know why people don't just play the Linux 64bit version... It's really easy to install, you can keep windows at the same time, and you don't have to worry about using ram... All you need is 10GB of disk space. I run 50 mods, all my graphics are on max, and I use about 4.5-5GB of ram with KSP, and it never crashes...

Maybe some people have weird reasons not to run linux? Whatever these reasons may be, this thread is about ksp32 + opengl on windows so please dont try to derail the thread.

Link to comment
Share on other sites

Maybe some people have weird reasons not to run linux? Whatever these reasons may be, this thread is about ksp32 + opengl on windows so please dont try to derail the thread.

Well, linux has weird reasons not to install in my PC.

I mean, probably backing up my 2TB HDD into another 2TB HDD I don't have, backing up the hackintosh installation there (or removing it completely), formatting the entire drive with the linux installer might just work, provided I later restore all the backups and go to the insanelymac forums to check how to restore the hackintosh installation. But it seems to much of a hassle for a single game. So much for linux's user friendliness.

(windows is in separate SSD I'm not touching for this)

Link to comment
Share on other sites

Well, linux has weird reasons not to install in my PC.

I mean, probably backing up my 2TB HDD into another 2TB HDD I don't have, backing up the hackintosh installation there (or removing it completely), formatting the entire drive with the linux installer might just work, provided I later restore all the backups and go to the insanelymac forums to check how to restore the hackintosh installation. But it seems to much of a hassle for a single game. So much for linux's user friendliness.

(windows is in separate SSD I'm not touching for this)

Funny, I've never had an issue installing Linux. And I've done it on many many machines. Not Linux's fault that you have a strange system setup and you don't have the common computer knowledge to know that you should never install an operating system on a disk that's 2TB! These disks are for storage, not OSes. Why? For the same reason you just mentioned. "Oh, I'm gonna back up my operating system. Wait, it's on a 2TB disk.... So I need another 2TB disk...." <--Fail....

By the way, if you ever did try the install, you'd see that it detects all your disks, and all your operating systems, and then gives you an option to shrink one of the partitions to make room for a linux install, and then installs a bootloader so you can choose what OS you want to boot into when your computer starts. People need to stop being afraid of Linux...

Maybe some people have weird reasons not to run linux? Whatever these reasons may be, this thread is about ksp32 + opengl on windows so please dont try to derail the thread.

Never saw anything about Windows... the thread is "Less memory usage by using OpenGL" and the discussion is about memory usage. And the thread starts with a comparison to 64-bit. So, I'm just wondering why not just use Linux 64-bit then...

Edited by xtoro
Link to comment
Share on other sites

Funny, I've never had an issue installing Linux. And I've done it on many many machines. Not Linux's fault that you have a strange system setup and you don't have the common computer knowledge to know that you should never install an operating system on a disk that's 2GB! These disks are for storage, not OSes. Why? For the same reason you just mentioned. "Oh, I'm gonna back up my operating system. Wait, it's on a 2GB disk.... So I need another 2GB disk...." <--Fail....

By the way, if you ever did try the install, you'd see that it detects all your disks, and all your operating systems, and then gives you an option to shrink one of the partitions to make room for a linux install, and then installs a bootloader so you can choose what OS you want to boot into when your computer starts. People need to stop being afraid of Linux...

I'm not buying another hard drive just to run a game because said game has poor memory management.

As for the install, it fails. I don't have the error message in my internet history, as I've googled it from the live session, but it, quite simply, won't install. As usual, the possible answers aren't in a proper user guide/official wiki but in Internet forums filled with geek techno jargon which doesn't work. I appreciate your arrogance at calling me a coward, but it's not a matter of "being afraid", it's a matter of a product (Linux) which doesn't work, no matter how much its fanboys insist it does.

Link to comment
Share on other sites

I'm not buying another hard drive just to run a game because said game has poor memory management.

As for the install, it fails. I don't have the error message in my internet history, as I've googled it from the live session, but it, quite simply, won't install. As usual, the possible answers aren't in a proper user guide/official wiki but in Internet forums filled with geek techno jargon which doesn't work. I appreciate your arrogance at calling me a coward, but it's not a matter of "being afraid", it's a matter of a product (Linux) which doesn't work, no matter how much its fanboys insist it does.

Right, both of you ladies put your dolls back on the shelf.

Linux as a problem isn't perfect, it's just as unstable as windows can be. I do agree it can be cumbersome/unfriendly to people who aren't technically inclined (either use a Mint/Ubuntu distro, or don't use it at all).

KSP also isn't perfect. It's pretty odd how you can't solve your linux issue, but have an understanding of memory management in KSP. Anyway, that's not the point, the current way of doing it is placeholder, it's a very simple way of loading graphics, but it works. Use Active Texture Management if you're having a problem.

Also, a 1TB HDD is £35, sure it's twice as much as the game but it's probably going to have other uses.

Link to comment
Share on other sites

To Others -- Not trying to derail the discussion about OpenGL

I'm not buying another hard drive just to run a game because said game has poor memory management.

As for the install, it fails. I don't have the error message in my internet history, as I've googled it from the live session, but it, quite simply, won't install. As usual, the possible answers aren't in a proper user guide/official wiki but in Internet forums filled with geek techno jargon which doesn't work. I appreciate your arrogance at calling me a coward, but it's not a matter of "being afraid", it's a matter of a product (Linux) which doesn't work, no matter how much its fanboys insist it does.

If you want to give a go at a Linux install again, plenty of us here, like myself, would be glad to help. Not all Linux users are jerks. If I had to guess, you're either having issues with shrinking a partition to make one for Linux or Grub is giving you issues after you've done everything else (9 times out of 10, Grub is where I get Linux install issues...like 3 days ago*). My recommendation is to use Linux Mint 17 XFCE (what I'm currently using to play KSP) because it's easy to install and setup as well as being supported until 2019. The Mint/Ubuntu is also good at helping new Linux users out, which is a good benefit to someone like yourself.

The dude who suggested the new HDD wasn't technically wrong. My HDD setup is like this -- 320GB Linux hdd with 2 GB /boot partition, 8GB swap partition (equal to my ram...I'm old school here), and the rest to my root partition ( / ). No home or any other crap (my old /home is my next HDD).Next HDD is 320GB all for Windows 8.1 and its boot partition. Last HDD is a 2TB drive with 2 partitions, 1.5TB ZFS volume with all my backups for Linux and a 500GB partition for backing up Steam games, all my isos + roms, and for transfering things from Linux to Windows (Windows can't read Linux partitions while Linux can read/write Windows partitions). While it is a bit silly to buy a HDD just for one game, a HDD for another OS, a game, and all you'll learn from Linux is really worth that cost.

I just realized something -- If you're trying to install any Linux on that HDD with OSX, remember that OSX uses GPT instead of MBR, and with GPT, you also need a "bios boot" partition (2MB iirc) for Linux to even boot up. The MBR to GPT transition, which has been going on for the past few years, is the source of many headaches in the Linux install world.

Oh, and whoever suggested that you only need 10GB was full of it. Mint 17 XFCE (which is the 2nd lightest one) clocks in at 18 GB with nothing but the boot partition, base system, Steam, KSP, and proprietary graphics drivers plus the dependencies needed to compile them (18 GB is my total installed size under my root drive, 16GB, + the 2GB of my boot partition)...that doesn't even include a swap partition which should be 4GB minimum. I recommend this setup for partitions for you -- shrink 30 or 40GB away from Hackintosh, make 2mb for bios boot, 1GB for /boot, 4GB for swap, and whatever is left for root ( / ). And ensure that Grub is pointed to that disk (the menu below the installer's partition table). If possible, put the swap at the front of the HDD -- that is a bit dangerous and is best done if you have a dedicated power supply...like running your PC from a generator...seriously...it takes a while and if you lose power, you lose the data on the disk. Shrinking/Growing a partition doesn't take much time at all so you'll be safe doing that from the wall plug.

Anyways, if you want to try it again, start up a new thread here, PM me that you have (because I likely won't see it otherwise), and myself (and possibly others) will be glad to help. And again, I recommend Mint 17 XFCE...the installer is literally clicking next a bunch, filling out a form for user name, password, etc, and setting up partitions. It really doesn't get any easier than Ubuntu/Mint installs, but I can help with Debian, Arch, Manjaro, Funtoo, Ubuntu, & various Crunchbangs. I prefer Debian and its derivatives like Mint and Ubuntu (apt package management is the shizzle). I have 12 years of Linux experience, 8 of those have been running pure Debian and the rest a mix of everything else.

*I installed Mint 17 just fine, rebooted, and it booted into a Grub error (that didn't have an error message...just Grub failed...). So I go WTF, boot the live disk back up, and sure enough everything is located where it should have been. So I rebooted and nothing but the grub warning it gave before. I finally realized that the Mint installer embedded itself into the wrong HDD's mbr (master boot record). So I hit F11 (my BIOS boot selection menu), changed to my 3rd disk (2nd is exclusively Windows), and it booted right up. Rebooted, went to the BIOS, physically set my 3rd disk as the first HDD to boot up, and all is well. I get a Grub menu and from there I can boot up Mint (with various options) or boot up Windows.

Link to comment
Share on other sites

1) If you want to give a go at a Linux install again, plenty of us here, like myself, would be glad to help. Not all Linux users are jerks.

2) The dude who suggested the new HDD wasn't technically wrong.

3) Oh, and whoever suggested that you only need 10GB was full of it.

1) I wasn't being a jerk. I suggested Linux because there's so many people who complain about memory problems and I suggested an easy fix that only takes 30 minutes to do. Then I got the typical "Linux sucks"-type response which I usually get from people who have never even seen it and know nothing about it (fear of the unknown, so respond by saying it sucks)

2) This was also me. I've been in the IT sector for over 18 years and I've been using Linux for 19 years (I was using Slackware in 1995). Even back when I started out, it was common knowledge that OSes go on their own drives, data on other larger ones.

3) Again, this was also me, but it was actually a typo, I meant 20GB. Mine is 16GB+4GB Swap and I have 3 different copies of KSP set up.

Link to comment
Share on other sites

1) I wasn't being a jerk. I suggested Linux because there's so many people who complain about memory problems and I suggested an easy fix that only takes 30 minutes to do. Then I got the typical "Linux sucks"-type response which I usually get from people who have never even seen it and know nothing about it (fear of the unknown, so respond by saying it sucks)

2) This was also me. I've been in the IT sector for over 18 years and I've been using Linux for 19 years (I was using Slackware in 1995). Even back when I started out, it was common knowledge that OSes go on their own drives, data on other larger ones.

3) Again, this was also me, but it was actually a typo, I meant 20GB. Mine is 16GB+4GB Swap and I have 3 different copies of KSP set up.

Don't take any offense to any of the comments that I made. They really were made in the general sense and not directed at anyone specific (though I did suspect some typos were involved when I saw the post discussing 2GB HDD's for an OS install). It was early in the morning and I only skimmed a few posts, didn't even look at user names, just to hopefully make juanmi reconsider using Linux and know that there is help here that won't be overly critical. I probably could have used another word besides "jerk", or a phrase like coming off a little too strongly or overly critical, of which all of us Linux guys can be accused of from time to time (comes with the territory I suppose).

Hadn't even finished a half a cup of coffee yet and I broke my own rule of not posting until that first cup is finished...I tend to word stuff poorly and come off a bit grumpy first thing in the morning when I'm not meaning it that way. And yeah, Linux is the real fix for KSP. Linux doesn't suck, but lack of knowledge and experience can make one think it does....well, the graphics drivers do suck when compared to the Windows equivalent. Have you heard that AMD's gonna open source their Linux drivers? It'll be interesting if/when they do (especially since I have an AMD/MSI R7 260x).

Slackware....you would say one of the very few distros that I've never installed. Ran a live disk once, but that's it. Don't have anything against it and I'd like to give it a shot one day. It is the oldest running distro after all, but I always find myself going back to Debian regardless of what I install....probably gonna wipe Mint and go back to Debian Testing or Siduction just so I can start with minimal and end up with only LXQT as my DE (as well as go back to a ZFS root). LXQT is coming along nicely if you want something different to try out. As for ZFS....nothing really comes close to its power and abilities, at least until Tux3 and/or BTRFS mature a bit more.

I was hoping that was one of the typos I thought I was seeing. While a 10GB Linux setup is doable...it wouldn't be any fun and probably be an email server or something specialized and likely headless.

I see your using almost the same amount of space as myself; as well as I agree on the one disk, one OS rule, other disks for extended data, though you'd laugh if you saw my last setup I had for ZFS testing purposes. I wish I had about 4TB to spare just so I could back all my stuff up and start over fresh.

//Unrelated to any of this, but the forum's auto-save feature is annoying. Especially when I italicize or bold a word, then I type something afterwards but do a typo, start to hit backspace, and the auto-save takes me back to the last letter of the bold or italicized word and starts to backspace from there. It's happened to me with every OS, every browser...I need to look into disabling that "feature". Sorry, it happened to me multiple times this post and I had to vent.

Link to comment
Share on other sites

I've been using OpenGL for about a week now, and my main install went from 2.9gb at load to just 1.8. It opened up enough room to install a few more part packs that would've easily crashed it under DX. I don't seem to have much performance loss with it either, though there is a noticeable, but very slight, drop in framerate at certain points. The shadows don't seem to render correctly, and I'm not sure about AA but that doesn't seem to work as well either.

All the above is well and good, and I can live with it (especially since I have more room for mods!) but the real kicker for me is that OpenGL almost literally destroys texture quality. I don't know if it's just me, but when I run OpenGL the textures are reduced to ugly, barely recognizable blobs of color. I imagine this is why it saves so much memory over DX. Now, I do use ATM (on both OpenGL and DX) so I first thought it was just ATM being ATM, and I hadn't noticed before...but I then loaded up the exact same mods (minus a couple part packs), with ATM on a new install, ran it normally (no force-opengl) and the textures were sharp and clear, with vivid colors and nice contrast...a complete 180 from OpenGL. So, for me at least, the texture quality issue is too big to run OpenGL on anything but my 'super-heavy' mod install when I want to test certain mods together.

If I could figure out the texture problem, I would probably switch to OpenGL exclusively. For now though, I'm going to jump back into the Linux world (been away from that for a few years) and try to get a Lubuntu USB flash drive to work (I don't have a separate HDD at the moment, and I don't want to give up any room on my Windows partition.) Hopefully that texture problem doesn't carry over into the Linux version...I know it uses OpenGL only, so that sort of worries me.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
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...