Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.161.0-pre remote editing pins CPU's to 100% #20405

Closed
1 task done
willowless opened this issue Nov 8, 2024 · 2 comments
Closed
1 task done

0.161.0-pre remote editing pins CPU's to 100% #20405

willowless opened this issue Nov 8, 2024 · 2 comments
Labels
bug [core label] performance Feedback for performance issues, speed, memory usage, etc remote dev Feedback for remote development servers

Comments

@willowless
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Grabbed the preview build and connected to my server. It worked so much better than the previous approach.
After browsing some folders and editing some files I noticed my UPS wattage was high and checked. Two of my CPUs were pinned to 100% utilisation. Quitting zed-preview dropped the CPU usage and UPS wattage back to normal levels.

I tried again and depending on the number of connections to the server is the number of CPUs it starts to hammer. At first it hovers around 5% and jumps up to 80% and after a while gets stuck at 100%.

I believe it is scanning the entire shared directory which given I have a lot of files can be quite a bit of data. Based on the Zed.log it was dipping in to all kinds of folders that weren't actively visible yet in Zed. I suspect, eventually, it'd complete its scan and the CPU usage would return to normal.

Environment

client:
Zed: v0.161.0 (Zed Preview)
OS: macOS 15.1.0
Memory: 16 GiB
Architecture: aarch64

server:
OS: Unraid 7.0.0-beta.3
Memory: 128 GiB
Architecture: x86_64

zed.dockerfile
FROM alpine:latest
RUN <<EOF
apk add --no-cache openssh-server
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ed25519_key -N ""
echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config
adduser -h /home/willow -s /bin/sh -D willow
EOF
USER willow:willow
WORKDIR /home/willow
RUN <<EOF
mkdir .zed_server
wget -O .zed_server/zed-remote-server-stable-linux-x86_64.gz https://github.com/zed-industries/zed/releases/download/v0.161.0-pre/zed-remote-server-linux-x86_64.gz
gunzip .zed_server/zed-remote-server-stable-linux-x86_64.gz
chmod +x .zed_server/zed-remote-server-stable-linux-x86_64
EOF
COPY zed.pub.willow_rsa .ssh/authorized_keys
USER root:root
CMD ["/usr/sbin/sshd","-D"]
EXPOSE 22

zed.compose.yml
services:
zed:
build:
context: .
dockerfile: zed.dockerfile
container_name: zed
restart: unless-stopped
env_file: default-environment.env
volumes:
- /mnt/user/documents:/home/willow/documents
networks:
containers-br2-network:
ipv4_address: ${address_zed?}
labels:
net.unraid.docker.icon: 'https://zed.dev/_next/static/media/zed-logo.11b2d662.png'
net.unraid.docker.webui: ''
net.unraid.docker.shell: 'ash'

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screenshot 2024-11-08 at 7 32 52 PM

If applicable, attach your Zed.log file to this issue.

Log includes too much personal information.

@willowless willowless added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Nov 8, 2024
@JosephTLyons JosephTLyons added performance Feedback for performance issues, speed, memory usage, etc remote dev Feedback for remote development servers and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 10, 2024
@ConradIrwin
Copy link
Member

@willowless How many files were in the directory you opened? We know we don't support huge directories very well yet (though we'd like to!): https://zed.dev/docs/remote-development#setup

@willowless
Copy link
Author

How'd I miss that note. Sorry about that. Yep - 426,736 files. I'll try avoiding such a large set of files. Adding just a few small folders worked great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] performance Feedback for performance issues, speed, memory usage, etc remote dev Feedback for remote development servers
Projects
None yet
Development

No branches or pull requests

3 participants