Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #73438 > unrolled thread

Tool to change (minimum) working set of an application/game ?

Started by"Skybuck Flying" <skybuck2000@hotmail.com>
First post2015-10-21 03:51 +0200
Last post2015-10-24 15:40 +0000
Articles 14 — 6 participants

Back to article view | Back to comp.lang.c


Contents

  Tool to change (minimum) working set of an application/game ? "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-10-21 03:51 +0200
    Re: Tool to change (minimum) working set of an application/game ? "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-10-21 03:55 +0200
    Re: Tool to change (minimum) working set of an application/game ? "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-10-21 04:17 +0200
    Re: Tool to change (minimum) working set of an application/game ? "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-10-21 04:34 +0200
    Re: Tool to change (minimum) working set of an application/game ? David Brown <david.brown@hesbynett.no> - 2015-10-21 09:14 +0200
      Re: Tool to change (minimum) working set of an application/game ? Richard Heathfield <rjh@cpax.org.uk> - 2015-10-21 08:42 +0100
        Re: Tool to change (minimum) working set of an application/game ? David Brown <david.brown@hesbynett.no> - 2015-10-21 11:36 +0200
          Re: Tool to change (minimum) working set of an application/game ? James Kuyper <jameskuyper@verizon.net> - 2015-10-21 12:05 -0400
            Re: Tool to change (minimum) working set of an application/game ? Richard Heathfield <rjh@cpax.org.uk> - 2015-10-21 17:42 +0100
          Re: Tool to change (minimum) working set of an application/game ? raltbos@xs4all.nl (Richard Bos) - 2015-10-24 15:38 +0000
      Re: Tool to change (minimum) working set of an application/game ? "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-10-21 09:54 +0200
      Re: Tool to change (minimum) working set of an application/game ? raltbos@xs4all.nl (Richard Bos) - 2015-10-24 15:37 +0000
    Re: Tool to change (minimum) working set of an application/game ? Keith Thompson <kst-u@mib.org> - 2015-10-21 12:32 -0700
      Re: Tool to change (minimum) working set of an application/game ? raltbos@xs4all.nl (Richard Bos) - 2015-10-24 15:40 +0000

#73438 — Tool to change (minimum) working set of an application/game ?

From"Skybuck Flying" <skybuck2000@hotmail.com>
Date2015-10-21 03:51 +0200
SubjectTool to change (minimum) working set of an application/game ?
Message-ID<df506$5626efa4$d47876e2$19830@news.ziggo.nl>
Hello,

I am starting to suspect that a certain game is being forced by Windows to 
eat it's own memory.

What I think might be happening is that the game is using so much memory and 
at the same time the caching effect is so large that the free memory is low.

This triggers the windows memory manager to start trimming the pages of the 
application/game and stores it into the page file.

These trimmed pages are then fed back to the application/game as if it was 
new/free memory.

So it's like a cycling process/sliding window process


----EAT--->#############---FEED--->

The pages at the back are eaten/ate and fed/feed to the front of the working 
set of the application.

This is not the desired behaviour I would want.

The phyical ram usage of the application should be allowed to grow to 3 GB, 
the system has a total of 4 GB.

What might be complexifieing the situation is thousands of little files 
being cached by windows which also eats memory.

Somehow this causes the "free memory counter" to be low and causes the 
trimmering to occur, such is my hypothesis.

This trimming must stop cause it's hurting performance because of all the 
"soft" page faults being triggered.

This entire paging algorithm inside windows is causing a CPU bottleneck 
which is causing the game the freeze and stutter.

I want that stopped, for now this is just an hypothesis.

I already checked the minimum working set size of this game/application and 
it's left at default, it was never adjusted by the creators of this game.

Thus I need a tool to be able to change the minimum working set of another 
application to be able to see what effect that has on this game.

So I want a tool to change the minimum working set of this game to something 
much larger as an attempt to try and stop this weird paging behaviour.

I already tried disabling prefetch and super fetch via disabledment of 
services and registry tweaks, which has little effect on windows caching 
behaviour.

Windows will happily continue caching and keeping these little game files in 
memory. I am not sure if the caching is conflicting with the game's 
memory/pages.

Changing the minimum working set does require special privileges. I have 
admin rights so that's should be ok.

Anyway the question does anybody know of an existing tool which can be used 
to change the minimum working set size of another app/game/process ?

I already took a look at process explorer, rammap, and vmmap from sys 
internals/microsoft but as far as I can tell they don't have this 
capability.

(process monitor seems to fail on my current system services setup, not sure 
if it requires a special service to run, I stopped/disabled a few).

Bye,
  Skybuck. 

[toc] | [next] | [standalone]


#73439

From"Skybuck Flying" <skybuck2000@hotmail.com>
Date2015-10-21 03:55 +0200
Message-ID<224c1$5626f0a9$d47876e2$20453@news.ziggo.nl>
In reply to#73438
Also I just realized 3 GB is not achievable with this game, since I think 
it's a 32 bit app.

However it seems to use/consume 1.2 GB at the moment, so there is still some 
room left to push it towards 2 GB of ram usage.

Perhaps such a tool could also be expanded to enable 3 GB mode ?

I am not sure if that would make sense and if an app can simply be modified 
by changing a little header or something.

But the idea itself is worth further investigation to lengthen life 
spam/usability of 32 bit limited applications/games by trying to increase 
the ammount of RAM they can use on todays 64 bit RAM filled systems :)

However this limited RAM issue could be solved by developers by compiling to 
64 bit code, however the paging problem/minimum working set problem might 
remain present in 64 bit mode ?!?

Bye,
  Skybuck. 

[toc] | [prev] | [next] | [standalone]


#73440

From"Skybuck Flying" <skybuck2000@hotmail.com>
Date2015-10-21 04:17 +0200
Message-ID<ec795$5626f5c0$d47876e2$23442@news.ziggo.nl>
In reply to#73438
Perhaps changing the minimum working set size, will not solve the problem 
and might have little effect.

The real problem could be that the memory manager of windows is conflicting 
with the caching system of windows.

The memory manager seems the "free" counter drop to zero or below a 
threshold and starts trimming applications of their memory.

Meanwhile this trimmered memory is taking by the caching system and/or fed 
back to the application causing the free counter to remain low, causing 
further trimming.

Perhaps the main problem is the caching system consuming memory and causing 
the free counter to drop.

Or perhaps Microsoft oversaw this problem/conflict and forgot to include 
"Available Memory Counter" to the trimming algorithm.

If true then this could cause Microsoft Windows 7 to perform trimming to 
soon, because available memory is not taking into account.

The memory manager only sees "free memory" and believes the system is low on 
free memory and starts the trimming process.

While in reality there was still cached and/or available memory and thus 
trimming was not necessary.

So perhaps this is the real problem.

Perhap the problem is so severe and deep inside window or perhap even 
unsolveable currently that Microsoft found it necessary to create a special 
service for it to combat this unwanted behaviour.

I came across this link/webpage today:

http://www.microsoft.com/en-us/download/details.aspx?id=9258

"
The Microsoft Windows Dynamic Cache Service will manage the working set size 
of the Windows System File Cache. For 64 bit systems this service helps to 
address the problem of excessive cached read I/O that could eventually 
consume all of physical memory. Sample source code and compiled files are 
included in the compressed file.
"

When you look at it in this light this sounds quite severe. (Lol meanwhile 
the S on my keyboard starts malfunctioning lol... it's old... spring long 
gone... piece of paper holds it up or so... yeah good thing... that reminds 
me I need a new keyboard too ! LOL :))

Anyway... you heard it here (possibly) first folks ! ;) =D

This definetly requires more investigation.

I my give the service a try... but it does scare me a little !

Bye,
  Skybuck.

[toc] | [prev] | [next] | [standalone]


#73441

From"Skybuck Flying" <skybuck2000@hotmail.com>
Date2015-10-21 04:34 +0200
Message-ID<3e640$5626f9cf$d47876e2$25798@news.ziggo.nl>
In reply to#73438
(S key fixed for now... probably some hairs were preventing the key from 
contact, preventing it from typing out the s, since a few minutes that was 
going on, problem solved for now ! pfew lol)

Bye,
  Skybuck. 

[toc] | [prev] | [next] | [standalone]


#73459

FromDavid Brown <david.brown@hesbynett.no>
Date2015-10-21 09:14 +0200
Message-ID<n07dt9$m45$1@dont-email.me>
In reply to#73438
On 21/10/15 03:51, Skybuck Flying wrote:
> Hello,
> 
> I am starting to suspect that a certain game is being forced by Windows
> to eat it's own memory.
> 
<snip>

Why do you think /any/ of this rambling is remotely related to Delphi,
computer architecture, game algorithms or C?  It may be that there is
some forum out there where your posts are on-topic, and you have hope of
getting help or advice - but all you achieve in these groups is annoying
people.

[toc] | [prev] | [next] | [standalone]


#73463

FromRichard Heathfield <rjh@cpax.org.uk>
Date2015-10-21 08:42 +0100
Message-ID<n07fgo$qmu$1@dont-email.me>
In reply to#73459
On 21/10/15 08:14, David Brown wrote:
> On 21/10/15 03:51, Skybuck Flying wrote:
>> Hello,
>>
>> I am starting to suspect that a certain game is being forced by Windows
>> to eat it's own memory.
>>
> <snip>
>
> Why do you think /any/ of this rambling is remotely related to Delphi,
> computer architecture, game algorithms or C?  It may be that there is
> some forum out there where your posts are on-topic, and you have hope of
> getting help or advice - but all you achieve in these groups is annoying
> people.

David, he's been achieving that for at least fifteen years. If he was 
educable, he'd have been educated by now.

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

[toc] | [prev] | [next] | [standalone]


#73467

FromDavid Brown <david.brown@hesbynett.no>
Date2015-10-21 11:36 +0200
Message-ID<n07m6t$h81$1@dont-email.me>
In reply to#73463
On 21/10/15 09:42, Richard Heathfield wrote:
> On 21/10/15 08:14, David Brown wrote:
>> On 21/10/15 03:51, Skybuck Flying wrote:
>>> Hello,
>>>
>>> I am starting to suspect that a certain game is being forced by Windows
>>> to eat it's own memory.
>>>
>> <snip>
>>
>> Why do you think /any/ of this rambling is remotely related to Delphi,
>> computer architecture, game algorithms or C?  It may be that there is
>> some forum out there where your posts are on-topic, and you have hope of
>> getting help or advice - but all you achieve in these groups is annoying
>> people.
> 
> David, he's been achieving that for at least fifteen years. If he was
> educable, he'd have been educated by now.
> 

I know that.  But he is rarely in comp.lang.c, and does not even pretend
to program in C (he likes to think of himself as a Delphi programmer),
so it is at least conceivable that he will listen and skip comp.lang.c
in the future.  As long as there is a slight chance, it is worth a try.

[toc] | [prev] | [next] | [standalone]


#73495

FromJames Kuyper <jameskuyper@verizon.net>
Date2015-10-21 12:05 -0400
Message-ID<n08cvi$9o1$1@dont-email.me>
In reply to#73467
On 10/21/2015 05:36 AM, David Brown wrote:
> On 21/10/15 09:42, Richard Heathfield wrote:
>> On 21/10/15 08:14, David Brown wrote:
...
>>> getting help or advice - but all you achieve in these groups is annoying
>>> people.
>>
>> David, he's been achieving that for at least fifteen years. If he was
>> educable, he'd have been educated by now.
>>
> 
> I know that.  But he is rarely in comp.lang.c, and does not even pretend
> to program in C (he likes to think of himself as a Delphi programmer),
> so it is at least conceivable that he will listen and skip comp.lang.c
> in the future.  As long as there is a slight chance, it is worth a try.

According to Google Groups, Skybuck Flying has posted 143 messages since
May 2001, 56 of them in the last two months. I think we can reasonably
expect to hear a lot more from him in the near future.
-- 
James Kuyper

[toc] | [prev] | [next] | [standalone]


#73500

FromRichard Heathfield <rjh@cpax.org.uk>
Date2015-10-21 17:42 +0100
Message-ID<n08f64$iob$1@dont-email.me>
In reply to#73495
On 21/10/15 17:05, James Kuyper wrote:

<snip>

> According to Google Groups, Skybuck Flying has posted 143 messages since
> May 2001, 56 of them in the last two months. I think we can reasonably
> expect to hear a lot more from him in the near future.

There's a fix for that.

-- 
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within

[toc] | [prev] | [next] | [standalone]


#73693

Fromraltbos@xs4all.nl (Richard Bos)
Date2015-10-24 15:38 +0000
Message-ID<562ba5e3.9579984@news.xs4all.nl>
In reply to#73467
David Brown <david.brown@hesbynett.no> wrote:

> As long as there is a slight chance, it is worth a try.

You have a greater chance with Donald Trump.

Richard

[toc] | [prev] | [next] | [standalone]


#73464

From"Skybuck Flying" <skybuck2000@hotmail.com>
Date2015-10-21 09:54 +0200
Message-ID<424cf$5627449c$d47876e2$8878@news.ziggo.nl>
In reply to#73459
LOL,

What you think this is ?

Some kind of on-topic forum ?!

No man... this is usenet !

Get USEd to it ! LOL.

Bye,
  Skybuck =D

"David Brown"  wrote in message news:n07dt9$m45$1@dont-email.me... 

On 21/10/15 03:51, Skybuck Flying wrote:
> Hello,
> 
> I am starting to suspect that a certain game is being forced by Windows
> to eat it's own memory.
> 
<snip>

Why do you think /any/ of this rambling is remotely related to Delphi,
computer architecture, game algorithms or C?  It may be that there is
some forum out there where your posts are on-topic, and you have hope of
getting help or advice - but all you achieve in these groups is annoying
people.

[toc] | [prev] | [next] | [standalone]


#73692

Fromraltbos@xs4all.nl (Richard Bos)
Date2015-10-24 15:37 +0000
Message-ID<562ba56d.9462125@news.xs4all.nl>
In reply to#73459
David Brown <david.brown@hesbynett.no> wrote:

> On 21/10/15 03:51, Skybuck Flying wrote:
> > Hello,
> > 
> > I am starting to suspect that a certain game is being forced by Windows
> > to eat it's own memory.
> > 
> <snip>
> 
> Why do you think

Why do you, having seen several of his specimina already, think Bucky
_thinks_!?
Ignore it, already. It's a write-only machine.

Richard

[toc] | [prev] | [next] | [standalone]


#73515

FromKeith Thompson <kst-u@mib.org>
Date2015-10-21 12:32 -0700
Message-ID<lnpp08vwye.fsf@kst-u.example.com>
In reply to#73438
"Skybuck Flying" <skybuck2000@hotmail.com> writes:
> Hello,
>
> I am starting to suspect that a certain game is being forced by Windows to 
> eat it's own memory.
[...]

Skybuck, perhaps you should consider creating a blog rather than
cross-posting to multiple newsgroups.  You wouldn't get any complaints
about off-topic posts, since the topic of your blog is whatever you say
it is -- and your readers would be people who are actively interested in
what you have to say.  There are a number of sites that will let you set
up a blog for free.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#73694

Fromraltbos@xs4all.nl (Richard Bos)
Date2015-10-24 15:40 +0000
Message-ID<562ba61f.9639343@news.xs4all.nl>
In reply to#73515
Keith Thompson <kst-u@mib.org> wrote:

> "Skybuck Flying" <skybuck2000@hotmail.com> writes:
> > Hello,

> Skybuck, perhaps you should consider 

If it were capable of considering _anything_, it would have done so by
now. It isn't. And that's enough of either of our attention wasted.

Richard.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c


csiph-web