Jump to content

[1.4.0] GCMonitor 1.4.8.0 - A graphic Memory monitor (Marsh 9th 2018)


sarbian

Recommended Posts

Here is an experimental build : GCMonitor-1.2.8.0.zip

It removes all the custom lib call and replace them with direct calls to get the memory. It should work for Windows, Linux and OSX.

Delete the content of the GCMonitor folder before install (except the PluginData to keep your config).

Can I have some feedback from the Linux and OSX players ?

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

I've been having a (to my mind at least) strange issue with this mod on my Windows laptop. The memory monitor seems to work fine, but the numbers the FPS display seems to have no relation whatsoever to what the screen is actually showing. The FPS count is pretty much constantly between about 20-25fps, regardless of what the game's doing. So it'll say 20-25 when it's running fairly smoothly, and show the same range with no visible difference when I can plainly see massive lag spikes sometimes dropping it to close to 1fps at times.

I am running a bunch of mods and having a bunch of issues (currently trying to isolate which mods are doing it), but this just struck me as a particularly odd issue - I'd sort of assumed an FPS counter would be the last mod to break :P

Link to comment
Share on other sites

  • 1 month later...

I recently began trying to run KSP under Ubuntu 15.10 and was finding that the memory always displayed as 0 until I got the 1.2.8 build. That fixed the issue completely. Thanks!

I was surprised to see that under Linux, KSP was starting out at 6G+ even though my windows installation with the same set of mods seems to run just under 3G at startup. But I have a lot of work to do on my linux installation before I'm ready to draw any conclusions...

Danny

Link to comment
Share on other sites

  • 2 weeks later...
[quote name='sarbian']Here is an experimental build : [URL="https://ksp.sarbian.com/jenkins/job/GCMonitor/27/artifact/GCMonitor-1.2.8.0.zip"]GCMonitor-1.2.8.0.zip[/URL]

It removes all the custom lib call and replace them with direct calls to get the memory. It should work for Windows, Linux and OSX.
Delete the content of the GCMonitor folder before install (except the PluginData to keep your config).

Can I have some feedback from the Linux and OSX players ?[/QUOTE]
This experimental build seems to be getting good feedback. Will it be released as "Stable" soon? Any plans to edit the .version file to accept KSP 1.0.5?

Also is there any way to suppress the minor logfile spam resulting from KSP trying to load the two non-C# DLL's (getRSS_x64.dll and getRSS_x86.dll)?

[I]Failed to load assembly C:\Program Files (x86)\Games\Kerbal Space Program\GameData\GCMonitor\getRSS_x64.dll:[/I]
[I]System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
[/I]

Cheers! Edited by Fwiffo
Link to comment
Share on other sites

Got a minor bug to report - When you hit Alt+12 and "Database" | "Reload All", you end up with an extra copy of GCMonitor running (and multiple of its Applauncher icons / onscreen mem/FPS readings).

(ps. Incidentally I've also been using this as a "feature" to remember when I've used Rebuild All too many times and ought to Reload KSP)
Link to comment
Share on other sites

  • 2 weeks later...

Now, I know I said "No more forums until mess fixed", but I figure bug reports are exempt :P

Having finally upgraded to v1.2.8 of this excellent tooI I must admit I'm seeing some rather odd numbers:

screenshot1_crop.png

Actual memory details re. KSP.x86_64 process:

VmSize:  6024600 kB
VmRSS:   2979024 kB

Debian GNU/Linux v8.2
KSP v1.0.5

Mostly stock-ish install, logs and mod-list available on request (though I figure other mods probably irrelevant here)
 

Edited by steve_v
Link to comment
Share on other sites

Oh FFS. This editor is appalling. Sorry 'bout the doubles, guess this will have to do since apparently I can't delete a post.

Edited by steve_v
Screw this IPS malarkey.
Link to comment
Share on other sites

What do you find strange ? 16EB sounds like the good limit for a 64bit arch :D

 

Yeah, the last version had some change to have more meaningful numbers for windows x86 but it is strange for Linux. I ll see what I can do for the next version. Would you rather see the vmSize or the RSS ? Both have their use, but I guess RSS is better for performance ...

Link to comment
Share on other sites

I'd say RSS is the more important of the two, vmSize doesn't mean much in the context. But whatever floats your boat, on KSP/x64 the whole memory thing isn't so important anyway, more a 'nice to know'.

OTOH, those numbers were funny enough to confidently say "not working as intended" :P

Link to comment
Share on other sites

  • 4 weeks later...

I had some "fun" with native calls on windows.

Here is 1.2.9 that can also track your GPU memory use on Windows. It may require Win 8+ for the API I use, feedback welcome.

https://ksp.sarbian.com/jenkins/job/GCMonitor/32/artifact/GCMonitor-1.2.9.0.zip

Not updating the OP since that one is a bit experimental.

Link to comment
Share on other sites

https://stackoverflow.com/questions/7880784/what-is-rss-and-vsz-in-linux-memory-management It is the same for WIndows. To make it short RSS is the memory actually used by the process and VSZ is that memory allocated to the process including the shared memory (this one is the one limited to 4GB on 32bit and this is why I show it)

I ll push an other version with more debug info tonight. I won't spend much time on it however. It was fun too look into but it got complex fast and I don't see myself doing the Linux/OSX support after looking into the requirement.

Also GCMonitor code is a mess... It was a prototype that turned into a hellish piece of code :)

Edited by sarbian
Link to comment
Share on other sites

Sarbian,

Just installed your latest version, and am comparing it to what GPU-Z is showing me

For some reason, GCMonitor is consistently underreporting the usage as compared to GPUZ, although, after thinking about it, I wonder if the discrepency is due to other stuff on the system (non-ksp) putting some stuff into the memory.

For example, when I loaded KSP with openGL, I saw the following:

GPU-Z   1800Mb
GCMon  1200MB

and, a simple startup:

GPU-Z 836Mb
GC      636Mb

So the discrepency seems to get larger the more memory is used.

 

Link to comment
Share on other sites

ok, I ll do more test tonight so see what is off. The API also gives a shared memory info that I did not add to the result so that may be it. If I can't make it work properly I won't insist and I'll remove it. The GPU info can easily be seen with an overlay like Afterburner unlike the process memory size.

Link to comment
Share on other sites

 

23 hours ago, sarbian said:

Here is 1.2.9 that can also track your GPU memory use on Windows. It may require Win 8+ for the API I use

I can confirm that I do not see GPU memory use on Windows 7. This isn't a complaint, just confirming your *may require Win 8+* statement.

I have to say that the memory monitor is much more useful than expected, I wish I'd tried it sooner! Thanks for making it! 

Link to comment
Share on other sites

@sarbian Small feature request based on something I find useful in the windows task manager's memory monitor. Can you display the peak memory used (optionally shown in the overlay text as well would be nice)? I find this particularly nice with Kerbal since the big hits to memory happen on scene change. Thus being hard to catch with the memory monitor on screen. By tracking the peak, we get to see just how close we're getting to the limit on scene change and thus why we're too close to the memory limit. I do this by watching Peak Working Set in Task Manager and find it interesting that between two scenes memory use has hardly changed BUT that during the scene change I actually hit an new all time high memory utilization. It would be wonderful to see this in game.

PS - Upgraded to Windows 10 and I now have the GPU memory display option! Very nice! Although it shows about 200 MB less than GPU-Z I would still say it is a really nice feature!

Link to comment
Share on other sites

Done, get 1.30. I also fixed a bug with the GPU for those with more than 1 GPU (all those with an integrated intel...). Now people can run around and shout "memory leak" with numbers.

I looked into the delta with GPU-Z and I won't fix it. I would need to access native DLL that are annoying to call from Unity mono version (broken ComImport for those who care).

Link to comment
Share on other sites

For those not seeing the GPU numbers, you may need to update the video card. I just updated mine to try and fix some crashing it was having with OpenGL and the GPU numbers are showing up after the update.

As for why it worked, I have absolutely no idea.

Link to comment
Share on other sites

I have the plugin loaded but I'm having trouble getting the key bindings to work on Linux. I already disabled all OS key bindings to Alt+F1 and Alt+F but nothing works. Any ideas?

 

Edit: Figured it out. The plugin actually uses KSP modifier key, not necessarily Alt, and I had it changed to the right Shift long ago because of the bug with keys triggering commands when typing in UI.

Edited by lodestar
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...