If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

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).

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.

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.

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.

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.

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.

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!

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).

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.

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