RE: Memory settings
Hi, Below the answers. Thanks /Ferdinando/ Il 05/12/2016 21:00, 4d_tech-requ...@lists.4d.com ha scritto: Message: 5 Date: Mon, 5 Dec 2016 19:31:02 +0100 From: Timothy Penner<tpen...@4d.com> To: 4D iNug Technical<4d_tech@lists.4d.com> Subject: RE: Memory settings Message-ID: <889B5CE1FCB86B4CA53DB7E91109DFCE041BCAD12D39@4d-xn1-exch> Content-Type: text/plain; charset="utf-8" As Arnaud mentioned: There is no "best settings" but "settings for each situation" and it's not easy to evaluate. This is very true. For a proper recommendation we would need to know more details, such as: * How big is the data file? 1.662.000 but can be even more less * How big are the indexes? Where i can see? * 64 bit 4D Server or 32 bit? Both. The application work in sigle, or in client server mode You already said that your machine is limited to 4GB of installed RAM, which means you are severely limited by hardware... I can put adjuntive ram However, if (for example) your data file is less than 1GB and your indexes even smaller than you have plenty of physical RAM. It all comes down to the details. As a blanket recommendation, do not exceed 50% of installed RAM when setting your maximum cache value. Kind Regards, Tim PENNER ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
RE: Memory settings
As Arnaud mentioned: > There is no "best settings" but "settings for each situation" and it's not > easy to evaluate. This is very true. For a proper recommendation we would need to know more details, such as: * How big is the data file? * How big are the indexes? * 64 bit 4D Server or 32 bit? You already said that your machine is limited to 4GB of installed RAM, which means you are severely limited by hardware... However, if (for example) your data file is less than 1GB and your indexes even smaller than you have plenty of physical RAM. It all comes down to the details. As a blanket recommendation, do not exceed 50% of installed RAM when setting your maximum cache value. Kind Regards, Tim PENNER ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Memory settings
Hi, But in pratical these are the options to set, how should be set for your opinion? Adaptive cache Percentage of available memory for cache Minimum size Maximum size Thanks /Ferdinando/ Il 05/12/2016 04:38, 4d_tech-requ...@lists.4d.com ha scritto: Message: 7 Date: Sun, 04 Dec 2016 18:46:16 -0600 From: Tim Nevels<timnev...@mac.com> To:4d_tech@lists.4d.com Subject: Re: Memory settings Message-ID:<9a7b3a51-fa2f-4ce5-bf88-121d3a8c7...@mac.com> Content-Type: text/plain; charset=windows-1252 On Dec 4, 2016, at 12:36 PM, Arnaud de Montard wrote: You said the machine had 4Gb of ram. 4D server 32 can use maximum 2Gb (~2000Mb) in these 4. You have to balance that between cache and "the rest of 4D" (executing methods, creating processes, etc.). I usually give 1500 (1,5Gb) to cache, the remaining 0,5 seems to be enough for "the rest”. I believe the max RAM that 4D can access is 4GB — the max byte value of an UNSIGNED longint. The max you can set the cache to is 2,384MB on macOS with 32bit 4D Server. (I think it is the same on Windows but I’m not sure.) 4D Server will not let you go any higher. It does this so that it will have 1,616MB for “the rest”. It will dynamically use that for what it needs. Next you have to consider how much memory the operating system needs. If all that the machine is doing is running 4D Server and not doing any file sharing, I would think a bare minimum would be 1GB. 2GB just for the OS should be more than enough. If I have a machine with 4GB+ of memory and I’m running 32bit 4D Server I’d set the 4D data cache to 2,300MB if there are less than 20 users and an average of 5 processes per user. The remaining 1,700MB will be used up by 4D Server for “the rest” and by the operating system. Run the system configured like this for some time and monitor memory allocation on the machine with Activity Monitor on macOS or Task Manager on Windows. If you see there is a lot of “Swap used” on macOS then you are maxing out on RAM. (I can’t remember the name of the option on Windows to indicate you are paging out memory.) Better to reduce the 4D data cache by 250MB or so and then see how that works. It is called fine tuning of memory usage. 4d server 64 can use much more ram (2^64), but still you are limited to 4Gb on that machine. I suppose that 2500-3000 reserved for cache will be enough for "the rest" and the system to breathe. Note: I have a very little experience of 64bit servers still, so please someone correct me if I'm wrong… On a 64bit machine with 4GB of memory I’d use the same settings. I’d probably not even use 64bit 4D Server on a machine with 4GB of memory. Don’t see much point to it. Max cache is still going to be around 2,300MB because you’ll still need the remaining 1,700MB for 4D Server “the rest” and the operating system to share. In my opinion you don’t need 64bit 4D Server unless you have at least 8GB on the machine. With an 8GB machine you can easily set the 4D data cache to 5,000MB. Tim Tim Nevels Innovative Solutions 785-749-3444 timnev...@mac.com ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Memory settings
4 GB of ram is a time bomb. Even if you could find a sweet spot of cache setting for your current operation, the sweet spot would shift when the data grow, number of users access or new features demand. It's simply not justified to risk stabability, productivity and your time just to save a few bucks on ram. Alan Chan 4D iNug Technical <4d_tech@lists.4d.com> writes: >I have one 4d application on windows that work on many records. >The machine: >Xeon, Windows server, 4 GB of ram and run only 4D. >The application is compiled, and work in client server. > >In memory settings where are the best settings that i can set? ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Memory settings
On Dec 4, 2016, at 12:36 PM, Arnaud de Montard wrote: > You said the machine had 4Gb of ram. > > 4D server 32 can use maximum 2Gb (~2000Mb) in these 4. You have to balance > that between cache and "the rest of 4D" (executing methods, creating > processes, etc.). I usually give 1500 (1,5Gb) to cache, the remaining 0,5 > seems to be enough for "the rest”. I believe the max RAM that 4D can access is 4GB — the max byte value of an UNSIGNED longint. The max you can set the cache to is 2,384MB on macOS with 32bit 4D Server. (I think it is the same on Windows but I’m not sure.) 4D Server will not let you go any higher. It does this so that it will have 1,616MB for “the rest”. It will dynamically use that for what it needs. Next you have to consider how much memory the operating system needs. If all that the machine is doing is running 4D Server and not doing any file sharing, I would think a bare minimum would be 1GB. 2GB just for the OS should be more than enough. If I have a machine with 4GB+ of memory and I’m running 32bit 4D Server I’d set the 4D data cache to 2,300MB if there are less than 20 users and an average of 5 processes per user. The remaining 1,700MB will be used up by 4D Server for “the rest” and by the operating system. Run the system configured like this for some time and monitor memory allocation on the machine with Activity Monitor on macOS or Task Manager on Windows. If you see there is a lot of “Swap used” on macOS then you are maxing out on RAM. (I can’t remember the name of the option on Windows to indicate you are paging out memory.) Better to reduce the 4D data cache by 250MB or so and then see how that works. It is called fine tuning of memory usage. > 4d server 64 can use much more ram (2^64), but still you are limited to 4Gb > on that machine. I suppose that 2500-3000 reserved for cache will be enough > for "the rest" and the system to breathe. Note: I have a very little > experience of 64bit servers still, so please someone correct me if I'm wrong… On a 64bit machine with 4GB of memory I’d use the same settings. I’d probably not even use 64bit 4D Server on a machine with 4GB of memory. Don’t see much point to it. Max cache is still going to be around 2,300MB because you’ll still need the remaining 1,700MB for 4D Server “the rest” and the operating system to share. In my opinion you don’t need 64bit 4D Server unless you have at least 8GB on the machine. With an 8GB machine you can easily set the 4D data cache to 5,000MB. Tim Tim Nevels Innovative Solutions 785-749-3444 timnev...@mac.com ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **