Over the last couple of months our users have been noticing increasing performance issues. I think the most noticeable one is browsing directories and viewing files. Though the other problem is a slow down of console performance.
The file browser is currently slow because it launches a new user process which is chrooted and then inspects a user’s files. This made for very easy and simple security and when a server is under light load it was actually quite quick. Under heavy load it grinds to a halt. Process start times balloon making file operations take forever for the user.
We are currently rewriting the code so that it no longer launches a sub-process. As of today we are about halfway through the total rewrite and plan on releasing it in stages once each segment passes through our testing loop.
The other main performance issue are slow consoles. By this I mean slow start times and laggy response to typing. Part of this problem is that scheduled tasks are run on the same server type as consoles. Scheduled tasks are very spiky so we’ve split those out to their own server type. Something that will help with latency while also making it easier to scale horizontally.
The slow start times for consoles is related to the file browser problem. Starting a console would launch a number of sub-processes to perform some admin tasks before actually launching the Python or Bash process. We’ve rewritten these functions so that this doesn’t happen. We should be able to release these fixes soon as they are currently in testing.
Thanks to everyone for bearing with us, we appreciate the support. Fixing the performance problems have been our top priority and we will not stop working on it until it’s fast for everyone.
All the best
From the PythonAnywhere team