What is a good number to assign for storage space for SharePoint trace logs?

Tevon2.0 1,101 Reputation points
2023-05-16T13:45:04.9633333+00:00

Looking to reduce the amount of wasted disk space being used on my Production server. What would be a good number to assign for trace logs. Currently my server is running low on memory and I'm unsure of the best settings to put in place and what my cache size should be updated to.

I'm Assuming I'd use management shell with this command prompt: Update-SPDistributedCacheSize -CacheSizeInMB CacheSize

Get-AFCacheHostConfiguration -ComputerName SRV-SHAREPOINT -CachePort "22233"

HostName : SRV-SharePoint.col.lingualistek.com

ClusterPort : 22234

CachePort : 22233

ArbitrationPort : 22235

ReplicationPort : 22236

Size : 1202 MB

ServiceName : AppFabricCachingService

HighWatermark : 99%

LowWatermark : 90%

IsLeadHost : True

User's image

User's image

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,272 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,946 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,410 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,015 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,864 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Ling Zhou_MSFT 14,530 Reputation points Microsoft Vendor
    2023-05-17T06:14:43.09+00:00

    Hi @Tevon2.0

    This is a description of the Restrict log disk space usage:

    User's image

    For your question, I am not quite able to give an exact storage space for track logs. Because this may be related to your SharePoint Farm traffic, your SharePoint operation type and Trace log levels.

    Here are some trace logging setting best practices:

    1.Change the drive to which the server writes logs.

    Because trace logging can use a large amount of drive space and compromise drive performance, you should configure SharePoint Server to write to another drive on which SharePoint Server is not installed.

    2.Set the appropriate Trace log levels.

    Set the trace log level to determine what logs will be logged, which will reduce the size of the logs.

    3.Enable event log flooding protection.

    If this option is enabled, then it will prevent writing many repetitive events in the logs. If an event occurs 5 times in 2 minutes, then it will surpass the same event for next 2 minutes. It logs the summary of the event along with several times it repeats. It is highly recommended to enable this option.

    You can go to Central Administration->Monitoring->Reporting->Configure diagnostic logging for the above configuration.

    22

    For more details about configuring trace logs please check: Configure diagnostic logging in SharePoint Server - SharePoint Server | Microsoft Learn


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Ling Zhou_MSFT 14,530 Reputation points Microsoft Vendor
    2023-05-22T07:33:08.6133333+00:00

    Hi @Tevon2.0 ,

    SharePoint Server assigns 10 percent of the total physical memory on the server to the Distributed Cache service. The Distributed Cache service uses half of that memory for data storage and the other half for memory management overhead.

    First, determine the total physical memory on the server hosting the distributed cache service. For example, I allocate 16GB of physical memory to host the distributed cache service.

    Second, reserve memory for other processes and services running on the cache host. This amount of memory is up to you. In my case, I reserve 2GB.

    Third, the memory of the distributed cache service is: the total memory minus the memory of other processes. In my case, it is 16GB - 2GB = 14GB.

    Fourth, half of the remaining memory will be used as the cache size for the distributed cache service. In my example, it will be 14GB/2=7GB (7168 MB), and the result will have to be converted to MB as a unit.

    In my case, the command will be:

    Update-SPDistributedCacheSize -CacheSizeInMB 7168
    

    This is the article about distributed cache size calculation:https://learn.microsoft.com/en-us/sharepoint/technical-reference/the-current-server-is-running-low-on-memory


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.