Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best sys(3050) setting

Status
Not open for further replies.

EmmaLu

Programmer
Jul 16, 2004
38
US
I am trying to determine the best setting for sys(3050,1). I see a number of discussions here with different answers. Some say 500 MB one says 618 MB and others say 1/2 of the available physical memory, which could be 1536 MB on a 3GB computer.

What setting is best for performance.

Thanks
 
The discussions have different results, because there is no easy one fits all answer to this question.

The important thing to know is, vfp does automatically reserve some portion of the memory and normally that is too much memory.

Right now Sys(3050,1) tells me my vfp session takes over 50% of the available physical ram (2 GB), simply after starting the IDE.

The more memory you/vfp allocates, the more data can be in cursors without being swapped to disk. But you're taking it away from other applications.

I would set both foreground and background buffer the same, there is enough memory for you to not swap to disk parts of it to let other applications allocate that memory while they're active.

What your app needs depends on how much data you have in cursors.

How much data do you crunch? Even if you would select GB large cursors allocating 1 GB memory will not help to fix the bottleneck of the network.

If you set it lower, vfp does not run against hard walls if it really needs more. set it to several 10 MBs, eg 64 MB, 128MB. Or inspect the task manager about allocated memory of your exe to have a value you can set initially.

Bye, Olaf.
 
The problem is that I am not working with an application that running on just one computer or network. My VFP8 application is running on some 10,000 computers with different operating systems and hardware. I am looking for some general rules that I could apply. I understand that it is not possible to have an optimum setting that will work for everyone, but I was hoping there was a way to adjust the memory allocation when the application starts based on the physical memory and maybe other factors.

Some of the users run the application with small data files but others can be 1GB or larger. Some users have 512 MB ram and others have 8GB. Some run it on a single computer, others on a network with dozens of workstations. Most users don’t care much about the impact on other Windows applications as their computer will be running our application almost exclusively.

One of the other problems I have encountered is that no one seems to know how VFP can determine the physical memory beyond 2GB. I have asked the question here and never received a full answer.

If a user for example has very large files and wants maximum performance, after they have beefed up their network for maximum speed is there any performance gain by adding more RAM maybe 4GB to 8GB? If so how can VFP check their physical memory size over 2GB and how should it be allocated with the sys(3050) function?

Thanks
 
Some years ago, Mac Rubel did a series of articles in FoxPro Advisor, in which he measured lots of performance issues. At that time, he found that about 1/3 of physical memory for SYS(3050,1) gave the best results. I can't guarantee that's still true today.

Tamar
 
Why not make the setting user-configurable in your application? Let users fiddle with it until they find the best solution in *their* environments.
 
Hi Emma Lu,

consider Dan's suggestion. Plus make a smaller memory allocation the default. It really does not matter much how large the data grows on disk, what they retrieve at the clients into memory matters. Retrieving a 1GB cursor for display in a grid is something that will depend on network bandwidth and not be speed up with more RAM, so they may do such a query once as a mistake. If they get the chance to filter what they want before you retrieve the data, that'll be just fine.

If an appllication runs in a network, it still runs on each single client, only if it runs in Terminal Server, more RAM on that server is indeed a good idea. But then it will only help, if the application does not allocate half of the available RAM for each session.

Allocating more RAM will mostly help in situations, where it's a single user desktop app with the database stored locally and no network between the client and the database file/storage server, in all other situations network is the bottleneck and you would rather seldom retreive much data to each client. If there will be processes running on all data, they should run server side.

I'd rather still recommend to only allocate maximum 128 MB, that's already much RAM for textual/ascii data. And if you make it configurable for the power user, he can try to make it faster with more RAM.

Bye, Olaf.
 
Thank you all for the help. As you suggest I am setting the inital RAM low and allowing power users to tweek it if the need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top