Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

The 16bit heaps expander thread

- - - - -

  • Please log in to reply
77 replies to this topic

#51
slhk

slhk

    Junior

  • Member
  • Pip
  • 68 posts

How about web browsers?

IE - based ones, for sure. Unlikely for others. Is there browsing scenario which eats a lot of USER (except opening lots and lots of pages)?

Firefox3 crashed easily after browsing alibaba.com for a while

Shall try IE when your new technology is launched, though I still prefer to use non-IE based browser


How to remove advertisement from MSFN

#52
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,780 posts
  • OS:98SE
  • Country: Country Flag

Donator

I'm pleased to announce that future Revolutions Pack 9 version will include technology which will greatly reduce USER resource usage in common scenarios. After your reports and my research i found a big hole in USER heap which i'm able to plug.

Way to go, Tihiy! :thumbup I shall test it as soon as you release it! :yes:

#53
eidenk

eidenk

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,527 posts
Hi, as i mentioned to dencorso by PM some time ago, I could not install RP9 properly because it turned out my registry was damaged since a couple of months.

Since this has been repaired I have now been using minimal install of RP9 since a few weeks and it seems stable enough here. There seem to be a little benefit with the resource usage but they end up getting depleted anyway. Perhaps your new fix will make this better.

Anyway, the point of this post is asking you tihiy whether there is a possibility you could release this resource optimizer as a standalone dll who could be installed without installing the rest of RP9.

I am guessing you got into doing such an optimizer to offset the cost of RP9 in resources and I am imagining that if RP9 wasn't there along the optimizer I would see an increase in free resource on fresh boot of perhaps 10% instead of 1 or 2%.
Asus A8V Deluxe - Athlon 64 FX-55 2.6Ghz - 1GB DDRAM 400 - Windows ME (IE 5.5 SP2 Shell) + KernelEx 4.0 and Revolutions Pack 10

#54
Drugwash

Drugwash

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,239 posts
  • OS:98SE
  • Country: Country Flag

How about web browsers?

IE - based ones, for sure. Unlikely for others. Is there browsing scenario which eats a lot of USER (except opening lots and lots of pages)?

SlimBrowser eats about 30-40% of resources, sometimes more. It does release most of them (save for 2-3% maybe) but only on exit, not on page close.
I could test your "baby" here since SB is open about all the time.

#55
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,919 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

eidenk, unless you use window skin, there is no differences in resource usage - since i know how to not use resources. You may want to cut RP9.1 into bare-bone by using only RP8.dll (deleting shl8.dll, uberhack.exe), but note, i'm about to change component dependencies.

#56
eidenk

eidenk

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,527 posts
Thanks for the headup Tihiy. I was only wondering because I saw all the stuff there is in the ctrl-alt-del panel, the quite big bitmap notably, but if you say it's all optimized, no worries. I'll try without the other dlls and see how it fares. Looking forward trying the new RP9 with the new User optimizations.
Asus A8V Deluxe - Athlon 64 FX-55 2.6Ghz - 1GB DDRAM 400 - Windows ME (IE 5.5 SP2 Shell) + KernelEx 4.0 and Revolutions Pack 10

#57
M()zart

M()zart

    Member

  • Member
  • PipPip
  • 275 posts

So is it worth it? Tell me scenarios you lack resources in.

May be its a bit too late for this but I tell you my two scenarios.

The first one is with SolSuite 2008. It is still compatible with Windows 98 (and 2009 also), but it eats VERY many GDI resources, more than 30% - 35 or even 50, though it releases them when closed. And I often browse with firefox and playing SolSuite simultaneously, because with my dial-up and disconnects every 2 minutes browsing is for patient people :). And I sometimes lack GDI resources.

The other scenario is playing Worms 2 portable. The game eats more GDI resources each time I start new match and does not release them, even after closing it, even with your RP 9.1. So if I try to play more than 3 - 4 matches without rebooting Windows crashes.

Couple of times I also had to press reset due to insufficient USER resources, even your kernel task manager was unable to help, but I cannot give you typical scenario. It seems that it was long uptime, active browsing with firefox and/or Opera.

My Evolve screensaver also eats 1-3 % of resources each time it works and does not release them, but it is not so big loss. Other apps behave well and release their resources, may be because of your RP.

#58
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,780 posts
  • OS:98SE
  • Country: Country Flag

Donator

In posts #2, 3 and 4 I had reproduced, as quotations, the now lost, original resources thread, from what I had saved myself. All posts between Oct 19 2007 and Nov 20 2007 were then lost. Now, thanks to RetroOS, who sent me a copy of the part I was missing, I have been able to complete the recovery of the original thread. :w00t: So, now, the quoted thread in posts #2, 3 and 4 is complete. Thanks a whole lot, RetroOS! You do rock! :thumbup

#59
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,919 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Not fair to spoil exectations, but i'm here again with some news.

New USER salvation is delayed due to my work on KernelEx 4 (finally) as well as other busy things.

The news, i've figured out how to theoretically implement GDI heap expander without breaking compatibility, performance and memory usage. This includes a lot of things to hax: global memory manager, local heap handle manager and GDI insides, but seems possible unless I bump into hard compatibility problems.

But theoretically, it can be very-very promising; i won't spoil numbers.

Or did rloew already implemented one?

#60
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,780 posts
  • OS:98SE
  • Country: Country Flag

Donator

:w00t: :w00t: Way to go, Tihiy!!! :thumbup :thumbup

#61
eidenk

eidenk

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,527 posts

Not fair to spoil exectations, but i'm here again with some news.

New USER salvation is delayed due to my work on KernelEx 4 (finally) as well as other busy things.

The news, i've figured out how to theoretically implement GDI heap expander without breaking compatibility, performance and memory usage. This includes a lot of things to hax: global memory manager, local heap handle manager and GDI insides, but seems possible unless I bump into hard compatibility problems.

But theoretically, it can be very-very promising; i won't spoil numbers.

Or did rloew already implemented one?

That's all great news Tihiy.

I might be wrong but I don't think rloew is into an heap expander at all as he's mentioned ongoing research into 512 MB graphic card and multiprocessor support and did not answer a question aboit a heap expander I made to him sometimes ago.
Asus A8V Deluxe - Athlon 64 FX-55 2.6Ghz - 1GB DDRAM 400 - Windows ME (IE 5.5 SP2 Shell) + KernelEx 4.0 and Revolutions Pack 10

#62
rloew

rloew

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,084 posts
  • OS:98SE
  • Country: Country Flag

Not fair to spoil exectations, but i'm here again with some news.

New USER salvation is delayed due to my work on KernelEx 4 (finally) as well as other busy things.

The news, i've figured out how to theoretically implement GDI heap expander without breaking compatibility, performance and memory usage. This includes a lot of things to hax: global memory manager, local heap handle manager and GDI insides, but seems possible unless I bump into hard compatibility problems.

But theoretically, it can be very-very promising; i won't spoil numbers.

Or did rloew already implemented one?

That's all great news Tihiy.

I might be wrong but I don't think rloew is into an heap expander at all as he's mentioned ongoing research into 512 MB graphic card and multiprocessor support and did not answer a question aboit a heap expander I made to him sometimes ago.


I haven't been working on the Resource problem in a while. Early analysis showed that there is no central block of code that handles them. It appears that many if not all particular Resources are coded individually. I haven't worked with 16-bIT Thunks, so it would take me a lot longer to identify and Patch all of the code that handles Resources. Even Patching one Resource at a time would not be easy since I don't know an easy way of determining all of the pathways to a given Resource.

I have only been looking at the 512MB Graphics Card issue for a matter of days. So far only one person has contacted me about testing.
I have thought about making use of Multiple Pocessors or Cores but only under Program Control, not the OS. I have not done the research or written any code yet.
Ye who enter my domain. Beware! Lest you become educated in the mysteries of the universe and suffer forever from the desire to know more.

#63
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,919 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

I'm back with news, and news are not bad: a functional alpha version of GDI extender was created.

My theory of decoupling handles from objects seems applicable (although there were lot of problems to make friends with GDI).
For now, only one type of object is extended: DIB bitmap. DIB bitmaps are actively used in a lot of programs (unfortunately, most leaky programs like Foxs*** pdf reader, your card game, that VB tool are likely to use DDB bitmaps) and are very heavy (2 global memory objects + selector array). Applying extender on them allowed to increase best case object count from 1'200 to 12'000! That means you can potentially open 10 times more tabs in Opera 9. My favorite 3xImgBurn test showed twice resource usage drop, allowing me to open 6xImgBurn copies (with user heap extender alpha enabled too).

Performance hit is negligible - 5% max in tests on my VM.

So, wanna wanna wanna? I'm planning to include both technologies in Revolutions Pack 10 (with completely rewritten core).
Beta testing may be possible, but i'm not promising any time / deadline.

Edited by Tihiy, 04 July 2009 - 08:49 AM.


#64
Joseph_sw

Joseph_sw

    Member

  • Member
  • PipPip
  • 217 posts
  • OS:98SE
  • Country: Country Flag

I'm back with news, and news are not bad: a functional alpha version of GDI extender was created.

My theory of decoupling handles from objects seems applicable (although there were lot of problems to make friends with GDI).
For now, only one type of object is extended: DIB bitmap. DIB bitmaps are actively used in a lot of programs (unfortunately, most leaky programs like Foxs*** pdf reader, your card game, that VB tool are likely to use DDB bitmaps) and are very heavy (2 global memory objects + selector array). Applying extender on them allowed to increase best case object count from 1'200 to 12'000! That means you can potentially open 10 times more tabs in Opera 9. My favorite 3xImgBurn test showed twice resource usage drop, allowing me to open 6xImgBurn copies (with user heap extender alpha enabled too).

awesome, with this image not displaying in browser could be remedied somewhat.

the problem was like this:
browser just showing blank white image yet it said that image has been completely downloaded, but if you looking for image files in cache, you can view it just fine with (dos) image viewer.

So, wanna wanna wanna?

you bet!

#65
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,919 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Nobody is interested?

Then i'll tell you how to increase GDI 32-bit heap now.
32-bit GDI heap is 2MB by default, that's pretty much; but, GDI actively utilizes this heap for storing small images and discarding DCs there. While it's not that easy to fill this heap, it is possible. With default 2MB heap worst case filling scenario would be ~200 48x48 images or ~5000 DCs (only likely if you're using leaky programs).

So it's good thing to increase GDI 32-bit heap size. It would be required for heap extender to go all-out, too.
Remember, this value is maximum size, not commited-at-once size. Don't ever set it smaller than 2MB.

You can change this value by adding line in win.ini section [windows]

[windows]
GDIMaxHeapSize=2048

(value in KB)

I would think of values like:
<128MB of RAM: 4096 (4MB)
128-256MB of RAM: 8192 (8MB)
256-512MB of RAM: 16384 (16MB)
>512MB of RAM: 32000 (~32MB, maximum value you can set).

Not likely you often run into this limit, but this knowledge is nice to recall.

#66
RetroOS

RetroOS

    Senior Member

  • Member
  • PipPipPipPip
  • 531 posts
  • OS:98SE
  • Country: Country Flag

...
So, wanna wanna wanna?...

I second that! - Yes, yes, yes!
GDI heap extender and User heap extender will be awesome!
RP10 will be some pack indeed!

BTW, nice tip about how to increase the GDI 32-bit heap.

Edited by RetroOS, 05 July 2009 - 04:12 AM.

retrofreak n a person who is very enthusiastic about something from the past.
retrology n the study of association with and revival from the past.
life n a series of near misses.

#67
Drugwash

Drugwash

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,239 posts
  • OS:98SE
  • Country: Country Flag
Tihiy, you know I'm always interested in testing/using such enhancements. You can count on me for alpha/beta testing at any time. Just use PM for details/links since I'm no longer using instant messaging.

#68
dencorso

dencorso

    Adiuvat plus qui nihil obstat

  • Super Moderator
  • 5,780 posts
  • OS:98SE
  • Country: Country Flag

Donator

@Tihiy: Supposedly, you can also go to HKEY_CURRENT_USER/Control Panel/Desktop/ and create the string value USERMaxHeapSize there, to control the max 32-bit USER heap size. While USERMaxHeapSize indeed exists inside USER.EXE, what I always found strange is: (i) why the control for USER is inside the registry, while the one for GDI is at WIN.INI?; (ii) why is it a string and not a DWORD or binary value? (iii) why WIN.INI instead of SYSTEM.INI?
It occurs to me that they may be alternative places, and that using both in the indicated place at the resgistry or both in WIN.INI would work the same, but, if so, why? Moreover, why, before you mentioned it, I'd only found these settings in french sites, which apparently cite one another (this one, for instance)? I know, I know... that's too many questions! :blushing: But I just wasn't able to resist posing you them since you wrote about GDIMaxHeapSize.
And, yes, yes, yes! You can count on me too to alpha/beta test, whenever you want it.

@Drugwash: Have you given Miranda up? :blink: I see you've purged it from your sinature too! What happened?

#69
Drugwash

Drugwash

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,239 posts
  • OS:98SE
  • Country: Country Flag

What happened?

Something as infinite as the universe, as Mr. Albert once said. But it's not worth hijacking this thread.

#70
slhk

slhk

    Junior

  • Member
  • Pip
  • 68 posts

Applying extender on them allowed to increase best case object count from 1'200 to 12'000! That means you can potentially open 10 times more tabs in Opera 9.

:w00t:

Nobody is interested?

Come on, Tihiy ... We are all waiting for this ...

#71
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,919 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

:w00t:

:no: however i'm highly unsure if it will work on DBCS systems.

#72
slhk

slhk

    Junior

  • Member
  • Pip
  • 68 posts

:w00t:

:no: however i'm highly unsure if it will work on DBCS systems.

Okay, I shall try when it comes out ... :(

#73
sparky4

sparky4

    Newbie

  • Member
  • 32 posts
  • OS:ME
  • Country: Country Flag
I am willing to test it on my Windows Me system! :D

and GREAT WORK Tihiy! :thumbup

Edited by sparky4, 07 July 2009 - 10:03 AM.

Posted Image
Microsoft Windows ME 4.90.3000
On "COMPY4" as "sparky4"
IntelĀ® PentiumĀ® 4 CPU 3.20GHz
1536MB RAM

irc://sparky4.net/#yotsubanome is the IRC I host

#74
eidenk

eidenk

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,527 posts
I have been experimenting a bit with GDIMaxHeapSize and USERMaxHeapSize.

Setting a value for GDIMaxHeapSize in win.ini results in DrWatson reporting after reboot that <unknown> has altered Windows system files. In the Patches tab it says that the module display has been patched in memory by <unknown>.

Setting a value for USERMaxHeapSize in either the registry as indicated or in win.ini in the same section as GDIMaxHeapSize yelds nothing that I can see.
Asus A8V Deluxe - Athlon 64 FX-55 2.6Ghz - 1GB DDRAM 400 - Windows ME (IE 5.5 SP2 Shell) + KernelEx 4.0 and Revolutions Pack 10

#75
Tihiy

Tihiy

    the creator

  • Member
  • PipPipPipPipPipPipPip
  • 1,919 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

<unknown> has altered Windows system files.

RP9 causes this message, it's not related.

And i must confirm other sites, GDIMaxHeapSize is in win.ini while USERMaxHeapSize is in registry. That's how it is.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN