Legacy Knowledge Base
Published Jun. 30, 2025

Document and Media Storage Breakdown on cloud shell

Written By

Santhosh Kumar

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • There is an issue with the breakdown of document_library storage.
    • In certain cases, document media occupies a larger amount of space, causing the cloud shell to become unresponsive and consume excessive CPU while calculating the size.

Environment

  • Liferay PaaS

Resolution

  • 'Nice' command to run du with a lower priority. The command is: nice -n 10 du -h <dir_name> 2>/dev/null | grep '[0-9\.]\+G'.

    The -n option allows you to set the niceness value. Niceness values range from -20 (highest priority) to 19 (lowest priority). A higher niceness value means the process will have a lower priority and will get less CPU time compared to processes with lower or default niceness values.

  • Alternatively, the following command can be used to make it less CPU-intensive by limiting the scope of the "du" command to 2 directory levels deep. The following command can also be used here:  du -h --max-depth=2 <dir_name> 2>/dev/null | grep '[0-9\.]\+G'

    By using either of the commands above,  the size of the document media folder in the cloud shell can be checked. 
Did this article resolve your issue ?

Legacy Knowledge Base