Skip to content

Commit

Permalink
Resolve high cpu usage even on idle system (#1189)
Browse files Browse the repository at this point in the history
* Resolve high cpu usage even on idel system
  • Loading branch information
vibhansa-msft authored Jun 29, 2023
1 parent 005c04e commit 51e8bb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- [#1161](https://github.com/Azure/azure-storage-fuse/issues/1161) Add more verbose logs for pipeline init failures
- Return permission denied error for `AuthorizationPermissionMismatch` error from service.
- [#1187](https://github.com/Azure/azure-storage-fuse/issues/1187) File-cache path will be created recursively, if it does not exist.
- Resolved bug related to constant 5% CPU usage even where there is no activity on the blobfuse2 mounted path.

## 2.0.3 (2023-04-26)
**Bug Fixes**
Expand Down
5 changes: 5 additions & 0 deletions component/azstorage/block_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import (
"time"

"github.com/Azure/azure-pipeline-go/pipeline"
azcopyCommon "github.com/Azure/azure-storage-azcopy/v10/common"
"github.com/Azure/azure-storage-azcopy/v10/ste"
"github.com/Azure/azure-storage-fuse/v2/common"
"github.com/Azure/azure-storage-fuse/v2/common/log"
Expand Down Expand Up @@ -173,6 +174,10 @@ func (bb *BlockBlob) SetupPipeline() error {
log.Trace("BlockBlob::SetupPipeline : Setting up")
var err error

// This is a workaround right now to disable the input watcher thread which continuously monitors below config to change
// Running this thread continuously increases the CPU usage by 5% even when there is no activity on blobfuse2 mount path
azcopyCommon.GetLifecycleMgr().EnableInputWatcher()

// Get the credential
cred := bb.getCredential()
if cred == nil {
Expand Down

0 comments on commit 51e8bb2

Please sign in to comment.