azurefile-csi-driver icon indicating copy to clipboard operation
azurefile-csi-driver copied to clipboard

reduce cpu, memory usage in CSI drivers on Windows

Open andyzhangx opened this issue 1 year ago • 1 comments

Is your feature request related to a problem?/Why is this needed

powershell command would consume more memory and cpu on Windows, it's better replace with Golang API in Windows host process mode

  1. Test-Path $Env:remotepath // PathValid determines whether all elements of a path exist // https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/test-path?view=powershell-7 // for a remote path, determines whether connection is ok // e.g. in a SMB server connection, if password is changed, connection will be lost, this func will return false replace with os.Stat, related to fix: https://github.com/kubernetes/kubernetes/pull/106906

  2. (Get-Item -Path $Env:mount).Target replace with os.Readlink does not work: https://github.com/kubernetes-sigs/azuredisk-csi-driver/pull/2265

  3. there are other powershell commands in following code, it's better replacing them all with Golang APIs (search RunPowershellCmd) https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/master/pkg/os/smb/smb.go

Describe the solution you'd like in detail

Describe alternatives you've considered

Additional context

andyzhangx avatar Jul 27 '24 15:07 andyzhangx

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Oct 26 '24 04:10 k8s-triage-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Feb 10 '25 13:02 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Mar 12 '25 14:03 k8s-triage-robot

would be fixed in csi driver v1.33.0

andyzhangx avatar Apr 29 '25 13:04 andyzhangx