Solved

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

Posted on 2009-07-13
16
675 Views
Last Modified: 2013-11-29
Summary: Windows server 64-bit dedicated for access via Terminal Services uses only 4 of the 6 GB of memory. See more details below.

Hi,

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]
timeout=1
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003 Standard x64 Edition" /noexecute=optout /fastdetect

Thanks for any help,
    Petr

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. ;)
0
Comment
Question by:pepr
  • 8
  • 4
  • 4
16 Comments
 
LVL 23

Assisted Solution

by:debuggerau
debuggerau earned 450 total points
Comment Utility
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..

http://www.cornerstone1.com/SAP/SAPBusinessOne_Setup_Sizing.pdf

Have you looked at getting away from Std server and move to Enterprise..
Even more memory access for caching..
0
 
LVL 28

Author Comment

by:pepr
Comment Utility
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.
0
 
LVL 41

Expert Comment

by:graye
Comment Utility
What's the size of the PageFile?   Is it at (or greater) than the "recommended" value
0
 
LVL 23

Expert Comment

by:debuggerau
Comment Utility
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..

0
 
LVL 28

Author Comment

by:pepr
Comment Utility
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...
Pagefile.PNG
0
 
LVL 28

Author Comment

by:pepr
Comment Utility
Here is the snapshot with info about the system. See the 6 GB of available RAM
server.PNG
0
 
LVL 41

Assisted Solution

by:graye
graye earned 50 total points
Comment Utility
OK... so those look right
0
 
LVL 28

Author Comment

by:pepr
Comment Utility
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)?
0
Too many email signature updates to deal with?

Do you feel like you are taking up all of your time constantly visiting users’ desks to make changes to email signatures? Wish you could manage all signatures from one central location, easily design them and deploy them quickly to users? Well, there is an easy way!

 
LVL 41

Expert Comment

by:graye
Comment Utility
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)
 
0
 
LVL 28

Author Comment

by:pepr
Comment Utility
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?
0
 
LVL 41

Expert Comment

by:graye
Comment Utility
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
0
 
LVL 23

Expert Comment

by:debuggerau
Comment Utility
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..

0
 
LVL 28

Author Comment

by:pepr
Comment Utility
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?
0
 
LVL 23

Accepted Solution

by:
debuggerau earned 450 total points
Comment Utility
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..


0
 
LVL 28

Author Comment

by:pepr
Comment Utility
Well, it is probably time to close this question and move to the other, related one -- see http:Q_24574952.html
0
 
LVL 28

Author Closing Comment

by:pepr
Comment Utility
Thanks both for the help and see the continuation of the question at the bottom comment.

Have a good time!
  Petr
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now