Why the memory above 4 GB is not used by the Windows 2003 Std. x64 Ed. with Terminal Services on it.

Summary: Windows server 64-bit dedicated for access via Terminal Services uses only 4 of the 6 GB of memory. See more details below.


We are observing the performance problems in situation when more than 10 users try to use SAP Bussiness One clients (version 2007) via Terminal Services. We have used the older version of SAP Bussiness One earlier and the experience showed that it is rather memory greedy. Because of the assumed increase of the number of users we had anticipated the neccessity to add memory; hence, we have chosen the 64-bit version of the Windows server where the clients are to be run.

The SAP clients are executed on the computer dedicated to access via TS. When 11th user does connect via TS and run the client, the server start to use the disk intensively -- it is likely that it swaps memory intensively. The task manager show that the system uses slighgly less then 4 GB of the physically available 6 GB RAM.

More details: The SAP Bussiness One uses Microsoft SQL Server on another machine. When the 11th user has problems with starting the SAP client, it is possible to run another SAP client on the machine where the MS SQL Server is located without problems, at the same time. Also, other users can log via TS to the dedicated TS machine and no problems are observed until they try to run the SAP client. In other words, it seems that the access to the database does not cause the problem, nor the number of users from the SAP point-of-view, nor the number of TS sessions via the dedicated TS server. It seems that it is the combination of using of the more memory-greedy applications on the dedicated TS machine.

It is not clear whether the problem is caused specifically by the SAP client application or if it would be observed when running whatever application with similar memory requirements (one clients takes about 300-500 MB of memory). It looks to me as if Terminal Services had some option of how much memory they can use (just my wild guess).

For the case it was interesting, the boot.ini content (placed on disk d: of the dedicated TS machine) is:

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003 Standard x64 Edition" /noexecute=optout /fastdetect

Thanks for any help,

P.S. I am starting to loose the last few hairs that I have. (It is not going to change my image too much as there is not too much to loose. It is just description of my mental status. ;)
LVL 30
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You have reached SAP's limits, and the database needs to create many tables in memory for operations. So you may have larger than average datasets, or complex queries, not sure but as you can see, 4Gig supports upto 30 users..


Have you looked at getting away from Std server and move to Enterprise..
Even more memory access for caching..
peprAuthor Commented:
Well, the application uses some add-ons that may require more memory than the SAP BO core.

OK. As far as I understand, the "more memory" is the key. Anyway, why should we move from Standard to Enterprise edition? According to the http://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx#physical_memory_limits_windows_server_2003, there should be no problem to use more than 4 GB in 64-bit Standard Edition.
What's the size of the PageFile?   Is it at (or greater) than the "recommended" value
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

true, you could expand up to 32Gig in your std platform, but not sure how much caching you want, but I'd fill it up..

peprAuthor Commented:
To graye: Well, I have to admit I have no reasonable experience with how that should be set. The truth is that I am only helping to solve the problem. But I guess that the swapping should be explained and solved. I guess the screenshot is going to tell you more.

The truth is that the recommended size is about 9 GB but currently only 2 GB is allocated. I do not know when the file size is increased...
peprAuthor Commented:
Here is the snapshot with info about the system. See the 6 GB of available RAM
OK... so those look right
peprAuthor Commented:
Is there any chance that Terminal Services may have some limit (settings) for RAM to be used by the applications? I guess it should not be the case as using TS with many users could be one of the most usual reasons to use a big memory and consequently 64-bit version of Windows server.

How could I test that I can go over the 4 GB? It seems that the problem with the above mentioned SAP clients could be just coincidence. I would like to test the ability to go over 4 GB independently on the client. Is there any application or the way to use reliably that much memory to see? Or is there a tool to learn about what happens with memory (say how to use PerfMon to find the reason)?
I'd recommend that you switch from trying to figure out the 4Gb issue, and concentrate on the SAP issue.
Purhaps SAP has a limit (similar to the way to can limit the amountof RAM used by SQL Server)
peprAuthor Commented:
Well, the SAP clients are just programs that require some memory. A single client instance does not use that much memory. I assume that the client instances run independently each on the other. Yes, I can be wrong. This is the reason why I want to check the ability to use more than 4 GB with some other application.

The SAP clients are 32-bit applications. From what I know, the 32-bit applications are executed via WoW. Could it be the case that WoW introduce the 4 GB limit of the used RAM?
Yes, but 32-bit application would *each* have a 2Gb limit, unless all of the SAP clients are running as a single process, that should be a factor
actually, 32Bits allows for 4Gig, 2^32 = 4.2 billion..

But the lower 2Gig is for kernel and the other 2 for apps..
That's where 64Bit helps, the kernel doesn't have this restriction..

However, the 32bit app does. it is limited to 4Gig, MAX..

I'd be looking at more memory for the kernel to use for caching..
Put the page file on it own raid array with very fast disks..
Don't let the system manage it, use a fixed size and ensure it is defraged..
pagefrag is one thing I use that may help..

peprAuthor Commented:
Well, I may have not explained my question well. I undestand why 32bit application is capable to address directly only 4 GB of RAM. This is not the problem here. The mentioned SAP clients does not need more than say 500 MB with the add-ons to be used (which I consider rather terrible, but still, no problem here).

The problem is that the server (hardware) is used as the one dedicated for connection via Terminal Services and there are "a lot" of users that execute the SAP client on that machine simultaneously. But each SAP client is a separate process demanding less than, say 500 MB RAM. So, there is nothing wrong with the client itself. The problem is that the physical memory is consumed because of the number of users who also launch their own SAP client. And the problem is that it happens just below the 4 GB limit (some memory for system, etc.) and it starts to swap even though there is more 2 GB memory that seems never to be used.

In other words, I would expect that the situation happened when reaching close to the 6 GB of occupated RAM (then I would see swapping reasonable). But it seems that swapping happened independently on the fact that I have 6 GB instead of 4 GB (as if it was only 4 GB).

As memory swapping is rather low-level, kernel-related operation, I suspect that the problem is not closely related to the SAP client. As the client is memory-greedy, it possibly only help to disclose the problem. The machine is of the customer and it is used for daily work. Therefore I cannot experiment there too much directly on the hardware. I possibly may do some tests (not very time consuming) that would not require something like server restart, etc.

From another point of view, it makes no sense to add more memory (to allow more users to run the SAP client) if the machine does not use even that memory that is there.

To repeat the core of the question: What can cause the situation when there still is a free RAM but it is not used and swapping to disk is started?

To debuggerau: "I'd be looking at more memory for the kernel to use for caching."
I do not understand that. Does it mean that the extra 2 GB that are reported as not to be used by processes could still be used by the kernel?
I'm ok with the first point, 500MB per client..
But is that for each client ( you said 10 and it got slow, so does that mean 500MB x 10? Or 500MB for 10 clients..)

Yes, page swapping just tries to get the memory defragmented for contiguous access.
It SHOULD be around 2.5 times the RAM, so in your case, 6G x 2.5 = 15Gig..

The rest of memory get used as diskcache, and the more available the less trashing your disks are going to do.

So swapping to disk, is, as you say a background task, and should not take precedence, if it did, there are far to many requests to defrag memory, a sure sign of a badly designed multiuser application.

Careful of the disk trashing, use perfmon to separate the disk cache operations from the page file operations to get an accurate picture.

Don't take my word for more memory, get others opinions, specifically, SAPs..

Now, you have a 64 bit system, running a 4Gig 32 bit app.
So, with an average kernel size of 500MB, that is 1.5 Gig unused..
Except it is not unused, its for disk cache like previously stated.

To Answer the last one:
Yes, IS being used by the kernel - when needed..

Also, now-a-days with very fast flash, its a great place to try to put a pagefile, but for 10 users, I doubt it is needed.

Get more memory, increase the pagefile, fix its size, separate the pagefile off the system disk and preferably off the data part too..

Or start doing some perfmon benchmarking and lets do the drill down..


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
peprAuthor Commented:
Well, it is probably time to close this question and move to the other, related one -- see http:Q_24574952.html
peprAuthor Commented:
Thanks both for the help and see the continuation of the question at the bottom comment.

Have a good time!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.