问题
The file in question is replicatorshared.log, and it is the largest single file on my machine, even larger than the Windows 10 swap file. I can stop the cluster and delete the file, and it will be created again when the cluster starts.
Can I control the initial size of this file?
What is this file used for that it needs to be so large at the outset?
回答1:
Check out this doc for more info:
https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-configuration
The setting you are interested in modifying is SharedLogSizeInMB.
See also: https://github.com/Azure/service-fabric-issues/issues/138
Depending on your environment the config will look like this:
<Section Name="KtlLogger">
<Parameter Name="SharedLogSizeInMB" Value="4096"/>
</Section>
or this:
"fabricSettings": [
{
"name": "KtlLogger",
"parameters": [
{
"name": "SharedLogSizeInMB",
"value": "4096"
}
]
}
]
来源:https://stackoverflow.com/questions/42261300/service-fabric-local-cluster-creates-8-gb-file-when-the-cluster-starts