forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Reducing VDS memory footprint

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Wed Oct 09, 2002 7:11 pm    Post subject: Reducing VDS memory footprint Reply with quote

Although VDS apps aren't necessarily CPU hogs, they do have a fairly sizeable footprint in memory. No matter how simple the script, even if it's idle, it's using at least 4 MB. Is this simply the runtime DLL or something else as well? Has anybody had any success reducing the amount of memory a VDS app uses? Not that 4-5 MB is a concern when you've got 128+ but many of the users where I work are still running on 200MHz/64MB boxes (not their choice, of course). If they're running 4 or 5 of the apps that I've written, it's chewing up a large chunk of resources.

Any insights would be helpful. Thanks! Smile
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Oct 09, 2002 7:29 pm    Post subject: Reply with quote

I think the DLL only loads once, after that
it's shared by subsequent VDS apps. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Wed Oct 09, 2002 7:47 pm    Post subject: Reply with quote

Unless it has been compressed using Petite Compression, UPX for example... It will reopen the DLL for each instance of your little applications you start. Anyway that's what I understood when Tommy explained it to me.

I think the DLL of VDS version 4.5 isnt compressed...not sure.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Oct 09, 2002 7:58 pm    Post subject: Reply with quote

If you use a shared runtime dll, then if one of your programs causes the dll
to crash, any other vds apps using the shared runtime will also crash or
become frozen.

Using the compressed dll of course doesn't have this problem, but then you
end up with more memory used due to several instances of the dll in use.

-Garrett
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Oct 11, 2002 10:05 pm    Post subject: Reply with quote

Marty wrote:
Unless it has been compressed using Petite Compression, UPX for example... It will reopen the DLL for each instance of your little applications you start.


Someone in an eariler thread wrote:
Quote:
Upon startup of a compressed EXE/DLL, all of the code is decompressed from the disk image into memory in one pass, which can cause disk thrashing if the system is low on memory and is forced to access the swap file. In contrast, with uncompressed EXE/DLLs, the OS allocates memory for code pages on demand (i.e. when they are executed).

Multiple instances of a compressed EXE/DLL create multiple instances of the code in memory. If you have a compressed EXE that contains 1 MB of code (before compression) and the user starts 5 instances of it, approximately 4 MB of memory is wasted. Likewise, if you have a DLL that is 1 MB and it is used by 5 running applications, approximately 4 MB of memory is wasted. With uncompressed EXE/DLLs, code is only stored in memory once and is shared between instances.
Some older virus scanners flag compressed EXE/DLLs as being virus-infected. (This is this reason I stopped compressing Inno Setup's EXEs.)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group