Cycle Consumption, Windows
To provide the maximum performance on the Windows operating systems, the database engine will take 85% of the cycles unless there is a modification to the 4D.ini file. The default in the Server is the 85% of clock cycles. The default in Single User is 40% of clock cycles.
This note defines how to set the clock cycles.
Play Movie: tM_4Dini.avi
Task Manager NT utility program allows you to see the performance of your system as well as the percentage of CPU time shared between all the NT processes.
WebClerk, CommerceExpert/WebClerk and theStoreKeeper all run on 4D's database engine which controls the
Even when 4D is not executing heavy tasks, it takes about 85% of the CPU time.
Let's have a closer look of what happens under the hood of the 4D multi-tasking
engine. First, 4D is always doing something! The 4D scheduler (the level 0 of its multi-
tasking environment that runs within one OS thread) is constantly running a loop that
checks whether a time-slice should be allocated to a 4D System process (i.e., Design)
or to a User defined process (started, for instance, with New process).
Because all 4D processes run in only one OS-based thread, the scheduler's process
time-allocation loop also includes a test to see whether “it is time” to give time to the
Operating System itself.
You may adjust the cycles consumed by 4D by creating or editing the 4D.ini file stored in the active Windows system folder. There are 4 items per set in the 4Dini file:
1. Header listing the application to apply the init file to.
2. The Number of ticks the scheduler waits before calling WaitNextEvent
3. The Minimum number of ticks the scheduler gives to the OS at each step
4. The Maximum number of ticks the scheduler gives to the OS at each step.
Format for the 4D.INI file is:
The 4D.INI header can be:
• [ALL] for all variants of 4 th Dimension
• [4D] for 4th Dimension, 4D Runtime, 4D Tools, etc.
• [4D_SERVER] for 4D Server
• [4D_STATION] for 4D Client
Specifies the "waiting delay" before the scheduler calls WaitNextEvent. This value is expressed in ticks. The greater it is, the less 4D calls WaitNextEvent and the less 4D calls back the OS. Increasing this value gives 4D longer chunks of time for processing. The user interface may seem slower, as the user is given control less frequently.
Specifies the minimal time the OS gets each time 4D calls it back. This value is expressed in ticks multiplied by 256. The greater it is, the more time is guaranteed to the OS.
Specifies the maximum time the OS gets each time 4D calls it back. This value is expressed in ticks multiplied by 256. The greater it is, the more time is given to the OS.
NOTE: One “tick” equals 1/60 of a second.
To apportion about 40% of the CPU time to 4D Server:
To apportion about 60% of the CPU time to 4D:
To apportion about 95% of the CPU time to 4D Server: