muraty
18th September 2001, 12:40
Hi,
according to the solution 78072 , every printdaemon cycle a "full table scan" occurs.Why does pdaemon purge the tttaad320000 table in every cycle.Another quesiton why does pdaemon check the printqueue every moment again and again, I am sure a more efficient method could be taken in consideration.
At least it is possible to change the interval of the cycle and sleeptime :)

Murat

VERSION(S):
B40x

SITUATION IDENTIFIED IN:
pdaemon6.1, Printer Daemon

SITUATION DESCRIPTION:
The printer daemon is excessively purging jobs so the pdaemon6.1 process uses excessive CPU time.
The result is that it takes extremly long for a print job to get to the printer.

SOLUTION DESCRIPTION:
When many users are printing jobs via the printer daemon, every print job has to be purged and each job has a delay time. The result is that the printer daemon runs in a cycle and in every cycle a purge action is done.
This means that in every cycle of the daemon, the printer daemon tests every print job in the queue (executes a full table scan) for the purge time. When the delay time has passed the record will be purged.
This takes a long time when there are many print jobs.

In the new portingset (6.1c.03.02 and higher) a new variable (purge_interval) is added to the printer daemon to set the purge interval. This is the number of cycles in which one purge action takes place.
This variable can be set in the file 'pdaemon6.1' in the directory '${BSE}/lib/defaults'
If a value between 200 and 400 is used the purge action will be done 3 to 6 times per hour.
The default setting of purge_interval is 1 when the parameter is not set.

Additional to purge_interval, the parameter sleeptime (default = 10) can be set.
Sleeptime is the time between every printer daemon cycle

The syntax for setting these parameters is :
purge_interval:200
sleeptime:10

After setting the variable, the printer daemon has to be restarted.

Gerhard
21st September 2001, 16:13
For me the question is, whether you need pdaemon at all. You only need it, when you use printers configured as "Printer". This is usally only done, when you want to use the Baan internal "queue management". If you only use printers configured as direct, Windows Printer ore any output to files, you can remove the start- and stop-sequences from $BSE/etc/rc.start (....stop) and thereby get rid of any performance issues which are caused by the pdaemon.

patvdv
21st September 2001, 16:22
Gerhard,

Is the pdaemon not also responsible for cleaning up files from $BSE/tmp (and not only ones generated by print requests)? Obviously this can also be done by a simple UX shell script etc.

JamesV
21st September 2001, 18:08
Many of our accounts do not use the pdaemon at all.

The pdaemon does flag print jobs as "removed" in Maintain Device Queue. However, the files are not removed from $BSE_TMP until the 'Purge device queue' (ttaad3221m000) is run.

Normally we just set a cron job to delete old tmp files from this directory. This includes the qp files and other process temp files.

For example, the baanFS.log in $BSE_TMP is from the maintain hours accounting via DDC in ERP 5. This file remains open and growing while DDC is running. This is not cleaned up by the pdaemon if DDC dies. (However you can disable the use of this log with the DDC_FS_LOG=0 environment variable).

The jobdaemon cleans up some temp files but every account I know of has to manually clean up $BSE_TMP on a regular basis.