Limiting Windows Memory Usage
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Limiting Windows Memory Usage

  1. #1
    Senior Member SodaMoca5's Avatar
    Join Date
    Mar 2002
    Posts
    236

    Limiting Windows Memory Usage

    This is not a security issue per se however it is a problem we are having.

    We use an HP 6000R with 6 800 MHz processors and 4 GB of RAM, running Win2K Advanced Server to run one of our core application servers. The server runs a SQL database. What we would like to do is limit the amount of RAM windows uses. What is occuring is that windows, when given the extra RAM (it was increased from 2-4 GB), just starts using more and more. We want to free up more for the Sybase database but it is being stopped at 1.5 GB. I did a google search for this and didn't find anything. I have also tried looking through my own win2k to find a solution.

    The application is not written to run on *nix or any other system so switching OS's is not an option (unfortunately).

    Any help would be appreciated.
    SodaMoca5
    \"We are pressing through the sphincter of assholiness\"

  2. #2
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    Check out www.blkviper.com. There is a list of services there and what they are for, the more services you are not using, the more you can turn off and free up CPU time and memory. It has made a pretty significant difference on my gaming system.

    Also, by limiting the number of services you are running, you are cutting down the possible entryways for people to get into your computer, which is a good thing from a security standpoint.

    Hope that helps,

    /nebulus
    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  3. #3
    AO BOFH: Luser Abuser BModeratorFH gore's Avatar
    Join Date
    Oct 2002
    Location
    Michigan
    Posts
    7,177
    im not sure how this may help you, but in my intro to networking class me and a pal were talking about this, some of the applications were not meant to be in a network so when they see ram they grab it for "just in case its needed" reasons and dont restore it, im trying to think where you could look for an answer....
    hmmm, take a look around at http://www.microsoft.com/ and see if they have anything available for this, but im pretty sure that it sounds like whats happening is the programs on the computer that arent used to being on a network (applications that are share memory better and return it because there designed for network use and are programmed to return memorey, applications that dont usually get used in a network dont do this well) im sorry i cant help more but im trying
    --------------------------------------------------------------------------------------------------------
    almost forgot but yea as neb said go check out blkviper, iv heard hes got alot of info that will free up memory.
    Kill the lights, let the candles burn behind the pumpkins’ mischievous grins, and let the skeletons dance. For one thing is certain, The Misfits have returned and once again everyday is Halloween.The Misfits FreeBSD
    Cannibal Holocaust
    SuSE Linux
    Slackware Linux

  4. #4
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    Here's some resource you might find useful :

    http://support.microsoft.com/default...;en-us;q308356
    http://www.microsoft.com/technet/tre...t1/dsgch08.asp
    http://download.precise.com/pub/whit...ser-Quotas.pdf

    And here's a commercial application for you:
    http://www.oneapp.co.uk/site/product...al_control.cfm

    Also, I found out (from link 1) that the process Lsass.exe is the one that steals all your memory. It's a "feature" that MS feels increases the effieciency of your system.

    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

  5. #5
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    AFAIK, all OSs need a certain amount of memory to keep track of the usage of the rest. Under Linux these are page table entries, and the number is directly proportional to physical memory, so yes, the amount used goes up with the amount available.

    Dunno about Windows, but I would imagine there's a limit to the amount of memory available to a single process (sybase) at any given time, this may be 2-3 Gb

    I would imagine that having separate machines to run your app server and Sybase would benefit it.

  6. #6
    Senior Member
    Join Date
    Oct 2001
    Posts
    748
    I think you are looking at the wrong thing as the culprit. The problem is not windows.. Rather is it SQL server. SQL is similiar to exchange in that it will eat up all available memory and then release the unused memory only when another application requests the memory. Unfortunately this does not always work properly. The best thing to do is to limit the amount of memory that SQL can use. This should keep windows from allocating it for SQL.

    http://support.microsoft.com/default...b;en-us;321363

    here is a quote from that article- "By default, SQL Server dynamically grows and shrinks the size of its buffer pool (cache) depending on the physical memory load reported by the operating system. As long as enough memory is available to prevent paging (between 4 - 10 MB), the SQL Server buffer pool will continue to grow. As other processes on the same computer as SQL Server allocate memory, the SQL Server buffer manager will release memory as needed. SQL Server can free and acquire several megabytes of memory each second, allowing it to quickly adjust to memory allocation changes. "

    This is one of the main reasons that MS recommends that if you are running SQL or Exchange, that you run them by themselves with nothing else running on the server.


    btw> some of the articles listed in other posts(lsass mem usage) do not apply unless your sql server is also your domain controller. Which would be a bad thing to do for many many reasons.

  7. #7
    Senior Member
    Join Date
    Jun 2002
    Posts
    394
    Greetings...

    task = unit of execution, process = object that owns memory. processes in Win2k are given a full 4Gb of addressing space in virtual memory, but has to ask the OS before it can use it. the reason being that the memory manager has to know how much memory a process is using in order to know is there is enough main memory for the program to run and so the virtual memory manager knows how to address the memory. the full 4Gb is not all useable by the process. some of it is used by the system, the rest by the program. Win2k Pro and Server have a 2Gb even split. Adv Server and Datacenter use 3Gg for the app and 1Gb for the sys. you can edit the boot file:
    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows 2000 Advanced Server" /3GB
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows 2000 Advanced Server [VGA mode]" /basevideo /sos

    for the app to use the new memory model the OS has to know the app is able to use the memory. so you have to set a flag in the header of the EXE file called IMAGE_FILE_LARGE_ADDRESS_AWARE has to be set to 1 (turned on). on the W2kAdvS CD in the support folder there is a program called IMAGECFG.exe that will set this flag.
    IMAGECFG -1 ASS.exe
    to set flag for exe names "ASS" turned off by using -0 instead.

    hope this helps
    have fun, and be good now...
    Hmm...theres something a little peculiar here. Oh i see what it is! the sentence is talking about itself! do you see that? what do you mean? sentences can\'t talk! No, but they REFER to things, and this one refers directly-unambigeously-unmistakably-to the very sentence which it is!

  8. #8
    Senior Member
    Join Date
    Oct 2001
    Posts
    748
    (V)/\><-- you beat me to it. I was just about to post the article that described the function of the /3gb switch.. Here is it anyways for anybody who needs it.

    http://support.microsoft.com/default...b;en-us;291988

  9. #9
    Senior Member SodaMoca5's Avatar
    Join Date
    Mar 2002
    Posts
    236
    Thank you for the investigation potential into SQL server. I will check but as far as I know the only thing running on the server is SQL server and the front end application getting data from it. I know it is not a PDC or BDC, WINS, etc. I will forward the articles you have posted over to the server administrator to look at (fortunately I am just trying to help and am not in the line of fire).

    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows 2000 Advanced Server" /3GB
    Please help me understand this, it looks to me as if this is partitioning a hard disk not RAM. This is based upon *nix experience not Windows. If this is not true please let me know. If so then how does it address the RAM situation? This is an area of tweaking I have never approached.

    Again, thanks for all the help so far, it has certainly opened new areas for me to look at. The final thing which we have not ruled out is bad coding on the part of the interface so please understand we do realize it may not be a Windows or a SQL Server problem at all. However we are trying to explore all possibilities to get this working as well as we can for our customers.
    SodaMoca5
    \"We are pressing through the sphincter of assholiness\"

  10. #10
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows 2000 Advanced Server" /3GB
    is the entry for the boot loader (NTLDR.EXE) for booting. What the /3GB does is that it passes a parameter to the Windows NT/2K/XP kernel that allows it to address memory in excess of 3GB kind of when you type "linux single" to boot into single user mode.
    Cheers,
    cgkanchi
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •