uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

39.3.7 Estimating the log

This subsection describes how to estimate each log file.

Organization of this subsection
(1) Setting the model and log to be used
(2) Method of estimating the log

(1) Setting the model and log to be used

This point describes the method of estimating the log using the following model 1 and model 2 as examples:

Model 1: Normal system
A model when a request is sent from the Web Service and SEI returns the response normally.

Model 2: Abnormal system
A model when RuntimeException is thrown in SEI of the Web Service.

The log settings used in these models are as follows:

For details about the log settings and default values, see 10.1.2 Settings for the common definition file.

(2) Method of estimating the log

The following table lists and describes the log output results for model 1 and model 2.

In this table, 'At start' indicates when the application starts, 'At end' indicates when the application stops, and 'when 1 request is processed' indicates the processing of one request by SEI. The output amount shows the amount of log output in these periods.

Table 39-15 Example of log output at start, when 1 request is processed, and at stop (model 1/ model 2)

No. Log types Output amount
At start When 1 request is processed At end
1 Operation log 0.7KB

Model 1:
0.0 KB

Model 2:
0.3 KB
0.3KB
2 Exception log 0KB

Model 1:
0 KB

Model 2#:
5 KB
0KB
3 Communication log 0KB 0.3 KB + HTTP request + HTTP responses 0KB
4 Maintenance log 2.4KB

Model 1:
3.2 KB

Model 2:
3.6 KB
0.4KB

#
Becomes the amount of stack trace of the exception.

The formula for estimating the log is as follows. Based on this result, each log file obtains one file size and number of files.

Amount-of-log-output-per-unit-time = 
 Amount-of-output-at-start
 + Amount-of-output-when-one-request-is-processed-in-model-1 [Figure] Total-number-of-requests [Figure] Percentage-of-normal-case-requests
 + Amount-of-output-when-one-request-is-processed-in-model-2 [Figure] Total-number-of-requests [Figure] Percentage-of-abnormal-case-requests
 + Amount-of-output-at-end

The following points describe how to estimate each file using examples based on this formula:

The example assumes a system in which there are 100 requests on an average in 1 minute and the log file size and number are estimated such that log is not wrapped around for 3 hours. Among all the requests, if you assume that requests ending normally are 80% and requests ending abnormally are 20%, because of 50-requests/ minute, total 18,000 requests (100 requests/ minute [Figure] 180 minutes) arrive in 3 hours.

In this case, if you calculate the amount of operation log output, the result will be as follows:

0.7 KB (Amount-of-output-at-start)
+ {0.0 KB [Figure] 18000}(Amount-of-output-when-all-requests-are-processed-in-model-1) [Figure] 0.8 (Percentage-of-normal-case-requests)
+ {0.3 KB [Figure] 18000}(Amount-of-output-when-all-requests-are-processed-in-model-2) [Figure] 0.2 (Percentage-of-abnormal-case-requests)
+ 0.3 KB (Amount-of-output-at-end)
=1081 KB

As a result of calculation, the file size and number of files meets the default value.

Similarly, if you calculate the amount of maintenance log, the result will be as follows:

2.4 KB (Amount-of-output-at-start)
+{3.2 KB [Figure] 18000}(Amount-of-output-when-all-requests-are-processed-in-model-1) [Figure] 0.8 (Percentage-of-normal-case-requests)
+{3.6 KB [Figure] 18000}(Amount-of-output-when-all-requests-are-processed-in-model-2) [Figure] 0.2 (Percentage-of-abnormal-case-requests)
+0.4 KB (Amount-of-output-at-end)
=59043 KB [Figure] 57.6 MB

If you assume 15 MB per log file as calculation result, the files count becomes four.

Notes
In the communication log, the amount of output changes according to the HTTP request and HTTP response. When you use attachments for communication, the attachment contents are recorded in the communication log as well, so when you use a particularly large attachment, you need to consider the size and number of files of the communication log file.