WebSphere Application Server & Liberty

 View Only
Expand all | Collapse all

How can I change the transaction log size in WebSphere Application Server?

  • 1.  How can I change the transaction log size in WebSphere Application Server?

    Posted Fri October 20, 2023 11:45 AM

    How to change the transaction log size in WebSphere Application Server?

    Do we expect the tranlog size to "shrink" when all in-doubt transactions have been processed?

    What determines the tranlog size ?



    ------------------------------
    GEETA NADELLA
    ------------------------------


  • 2.  RE: How can I change the transaction log size in WebSphere Application Server?
    Best Answer

    Posted Fri October 20, 2023 11:49 AM

    Question 1) How to change the transaction log size in WebSphere Application Server?

    Answer) To change the size of transaction log files, modify the Transaction log directory field to include a file size setting. Use one of the following formats, where directory_name is the name of the transaction log directory and file_size is the disk space allocation for the transaction log files, specified in kilobytes (nK) or megabytes (nM). The minimum transaction log file size that you can specify is 64K. If you specify a value that is less than 64K, or you do not specify a value for the file size, the default value of 1M is used.

    ;file_size

    directory_name;file_size

    dir://directory_name/directory_name;file_size

    /directory_name/directory_name;file_size

    For example, for a Windows system, the following entry specifies that transaction log files are created in the directory c:\tranlogs with a size of 2 megabytes.

    c:\tranlogs;2M

    In a non-production environment, you can turn transaction logging off by entering ;0 in the Transaction log directory field (do not enter a directory name). Do not turn transaction logging off in a production environment because this prevents recovery after a system failure, and therefore data integrity cannot be guaranteed.

    For more information about transaction log sizes, see the pages below:

    https://www.ibm.com/docs/en/was-nd/9.0.5?topic=service-managing-transaction-logging-optimum-server-availability

    https://www.ibm.com/docs/en/was-nd/9.0.5?topic=service-configuring-transaction-properties-application-server


    Question 2) Do we expect the tranlog size to "shrink" when all in-doubt transactions have been processed?

    Answer) If you mean the size of the file on disk - NO. Internally, when transactions are completed space is freed up (kind of) but you won't see that externally.


    Question 3 ) What determines the tranlog size ?

    Answer) This depends on things like the number of databases/SIB/server-server transactions/WMQ etc and also on security. It actually writes more data (deletion records) and then the key pointing will discard those records when switching files - but you don't really need to know about that. the transaction log has two parts - the tranlog and the partner log. They both default to 1MB. By default there are 2 transaction logs and 2 partner logs. Typically those are fine. The data in the tranlog is for each transaction - it is generally short lived. The active tranlog will fill up and a key point will occur which basically writes a fresh file from in-memory tran service state to the inactive file then switches that file to being active



    ------------------------------
    Marcio D'Amico
    ------------------------------



  • 3.  RE: How can I change the transaction log size in WebSphere Application Server?

    Posted Wed November 01, 2023 06:36 AM

    Hello,

    To change the transaction log size in WebSphere Application Server, you typically need to modify the server's configuration settings through the WebSphere Administration Console or by editing the server.xml configuration file. This involves adjusting parameters related to the transaction service, such as log file size and the number of log files to retain. Ensure you follow the proper steps and best practices to avoid disruptions in your application environment.



    ------------------------------
    Usman Mushtaq
    ------------------------------