-
Notifications
You must be signed in to change notification settings - Fork 412
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
getplugins.php - 5.7s load time #2427
Comments
Hi @BloodyIron, this is probably specific to your configuration or hardware. What I suggest doing is installing If you're interested in steps for this solution, please provide more details about the hardware and operating system. |
Well it's a container, so that would be wiped away if it were to ever be re-initialised. The container runs in a 3x node k8s cluster, each node in a VM on Proxmox VE (Linux KVM) with pretty good underlying hardware for the compute (one of the nodes is a Dell R720, the others are FX-8320 based). The storage that backs the application aspect (not the torrent content) runs on a FreeNAS system with ZFS, and is striped-mirrored SSDs (4x total), and the network interconnects are multiple 1gige LACP bonds. I do not realistically see any network, storage, CPU, or other forms of hardware contention. Multiple other websites I run on the same infra run substantially faster, and it's strictly this one php file that drags its heels. |
@BloodyIron Any update on this issue? Did you upgrade to ruTorrent version 4.0 stable through your docker install script? Have you tried anther web browser (such as Google Chrome)? This could be a web browser problem. There are web developer tools on chromium you can use to debug this issue. You can record the web page for 10 seconds while it loads, then get detailed information about what is causing the problem. |
@stickz well this is a new one, a developer haunting me for an update! haha! XD I love it! Okay. so I wasn't aware that crazy-max ( https://github.com/crazy-max/docker-rtorrent-rutorrent/releases ) had released a new version (plus I've been AFK for the last 4-ish days). So I'll try that image after I send this message. Just to clarify though this isn't... "my" script or anything like that. I'm simply using the docker image in kubernetes, feeding it settings, and that's about it. As for other browsers, I can't remember which browsers I tested it with, but I can test again with multiple browsers, and as a point of relevant interest my primary browser is Vivaldi, which is a Chromium derivative (but I can test Firefox/others too). As for the developer console, that's how I was able to get the loading time for this file in the first place. I didn't record the waterfall load, I would just have the developer console open, then load the page, then watch and review. I'll switch to the new image shorty and report back. By the way, seriously loving your support here! Thanks a tonne! :) |
@stickz okay so I had to explicitly use "crazymax/rtorrent-rutorrent:4.0-0.9.8-0.13.8" as I wasn't sure if "latest" was actually delivering the new ruTorrent... and now I have v4.0 running, however the problem persists. In all three tests below, I was using incognito mode, and was also ctrl+f5'ing to force any cache drop/regeneration. Load times of getplugins.php:
I don't know why Chrome had a spike in load times, but yeah... here we are... And these load times were really the same after multiple refresh/reload/ctrl+f5's, so it doesn't look to be a load-once problem. I also want to clear up that this is not an underlying hardware issue (so far as evidence shows), as I have other containers running websites (like argoCD, for example) which load substantially faster (500ms in the example of argoCD). And I do not observe any CPU, RAM, networking, or disk contention that could contribute to this (especially since the majority of this content is likely cached in RAM by the container, speculation though). I would like to add, however, that there are rendering issues in Vivaldi. I do not know why they happen. I will not be posting a screenshot (as well... there's sensitive information), so I'm going to describe it as best I can. This rendering issue does not seem to happen in Firefox or Chrome so yeah...:
I'm going to roll back to the pre-v4.0 image as I want to be able to read this text, but should you want me to test more, then I gladly will :) |
|
Hi @stickz Oddly enough, switching back to crazymax/rtorrent-rutorrent:4.0-0.9.8-0.13.8 the previously mentioned graphical issues in Vivaldi don't exist... and it's confusing lol. Let's just ignore that for now and if it happens again I'll try to provide something actually useful around that (for now I'll keep crazymax/rtorrent-rutorrent:4.0-0.9.8-0.13.8 as my daily driver). As for your screenshot requests... here's the one you asked for: Here are two additional ones that are not what you asked for but may be helpful anyways... : As for the conf.php file, that file doesn't exist in the docker image except under folders for different plugins, so I'm unsure the "proper" way to do that with this particular container... What kind of performance timing difference are we talking about here for disabling $do_diagnostic ? Is that an environment variable I can pass to it perhaps? |
The file does exist, it's right here. ruTorrent will not function without it. Also, while you're in there, ensure |
Okay I found the config.php file, I somehow missed it first time I looked and it wasn't quite where I anticipated it in the container (despite searching the whole root/recursive file structure). Anyways... phpUseGzip is set to false, do_diagnostic is set to false, and getplugins.php is still averaging about 5.7s load time I have explicitly confirmed those variables are set to false in the running config.php |
sorry to butt in, im just reading along / following / happy to help if i can, im just wondering BloodyIron, have you tried disabling plugins or 'moved' plugins like they call it, to try narrow down which if any are causing it? i ask because they seem to have identified which plugin is actually causing it 'extsearch' in there case. if that could be possible in your case maybe it could help? ignore me if not, just enjoy this sorta stuff :) |
@n1ce-0ne yeah I had seen that particular one suggested as disabling, so these are the ones that I've had disabled this whole time: diskspace,extsearch,feeds,filedrop,geopip2,ipad,rss,rssurlrewrite,unpack |
I'm currently facing a similar issue on a multi-tenant box. ruTorrent is hosted on an SSD drive, rTorrent is hosted on individual drives. For several users, ruTorrent getplugins.php loads sub 1 second, with every plugin loaded. However, two users sharing the same drive are facing ~6 second script times for the getplugins.php script. Underlying drive has almost zero activity, so it doesn't seem to be directly related to disk activity on the underlying rTorrent (xmlrpc) device. If I disable the FileManager plugin, load times go to 3 seconds (still high). Other users on the server are able to have 1 second load times even with FileManager enabled. That said, a slow trace is largely indicating that the stack time is getting spent caught in the xmlrpc calls:
Disabling FM still gets caught in xmlrpc time
ruTorrent version is v4.0-beta3 for all users. Honestly, can't explain anything beyond potentially some weird intra-drive differences in the ability to make xmlrpc calls to the rTorrent interface, even though the drive itself is mostly idle. |
@liaralabs @BloodyIron Please give aeb9f62 a try and set |
I just cherry-picked the commit to the install in question and it seems to have made some improvement. 2.5 seconds with filemanager and 1.4 or so with it disabled. Still some time spent in the unpack plugin (same with filemanager). Took a peek at |
progress, great to see :) |
Thanks for the feedback. We can add
You should be able to get similar loading times with I will also separate bin diagnostics, so these can be disabled. This will allow faster look-ups of binaries by caching shell results. An install script should not require bin diagnostics. It can delete |
@stickz I switched to "crazymax/rtorrent-rutorrent:4.0.1-0.9.8-0.13.8" which, according to your discussion with CrAzY mAx here ( crazy-max/docker-rtorrent-rutorrent#215 ) should already have what you propose in it. Results????: un-cached (ctrl+F5) getplugins.php : 6.9s Now, the uhhh... weird... thing is... I don't seem to have the plugin "filemanager" loaded, enabled... or even disabled... These are the plugins I have disabled (copy paste from YAML): "diskspace,extsearch,feeds,filedrop,geopip2,ipad,rss,rssurlrewrite,unpack" So not sure what to make of the filemanager plugin thing... But yeah, SUBSTANTIALLY IMPROVED! At this point "action.php" seems the slowest with load times of ~950ms (or similar) at a few points. (maybe last area for speed improvement? but this is very usable now!) Thanks to @crazy-max and @stickz plus anyone else that was involved! \o/ |
Oh, and I still have RU_DO_DIAGNOSTIC (env variable equivalent) set to false. Should I set it to true now? Or... wait for something? |
@stickz oh also, the version in the help GUI for ruTorrent still says 4.0, not 4.0.1, maybe poke that with a stick sometime ;) |
@BloodyIron file manager is a third party add-on. It's fairly popular, but it seems plausible your container author hasn't included it in the image. I wouldn't worry too much about it -- after all, this wouldn't be the correct place to complain about issues in 3rd party plugins. Mostly brought it up as a point of comparison (since the plug-in runs its own check for remoteEXEs and the function is built in to ruTorrent) |
@stickz okay so I want to add that if I don't go to my ruTorrent set up for a while (hours) the initial load is still in the realm of like 5-8s. Naturally I didn't get an actual number since I didn't hit F12 before loading the page. So this story may not be over just yet. @liaralabs roger that! Thanks for the explanation :) |
@stickz I'm giving the changes a more thorough testing today and I've bumped into the following issue. Not sure if it's unintended behavior or just a quirk of the change that is the way it is. I'm working on adding Once the which.dat is generated for the user in question, the problem disappears and can no longer be reproduced so I'm guessing the which.dat is an important fallback which hasn't yet been generated for users in question on the first load. |
Fixes issue reported in #2427. #2427 (comment)
@liaralabs this should be fixed in 0dbc009. I believe the problem was caused by setting There is one more issue with file permissions I'm going to resolve. The I will rush the release of version 4.0.2 today for you. It's highly recommended to set |
Also, please don't rush a release on account of me. The changes are just queued up in develop. No rush, and please enjoy your Sunday 😄 |
@liaralabs version 4.0.2 is live. https://github.com/Novik/ruTorrent/releases/tag/v4.0.2 @BloodyIron in v4.0.2 |
@stickz is it recommended to set |
@stickz I've set cachedPluginLoading=true (I assume the dollarsign is not needed?), and loaded the latest @crazy-max image with tag "latest". Multiple testing, incognito/not, including plenty ctrl+f5's, and I'm still getting 7s-8s loading times for getplugins.php. I went to the shell for the running container, and verified the variable is set to true in the running environment. I may be doing this "wrong" somehow, but... ?? also, do_diagnostic is currently set to "false",... I'm going to retest with it as "true" now.... |
Yeah setting do_diagnostic to "true" does not appear to improve the situation, getting generally the same load times for getplugins.php :( I'm going to set that back to "false" now. Tidy IaC for me! |
@BloodyIron the dollar sign is needed, it prepends all variables in PHP. |
@Jolly-Pirate well... uhhh... I'll try with the dollarsign then... HMB 🍺 |
Yeah so "$" characters are invalid for kubernetes environment variables to be passed... so... not-workable, but pretty sure the variable is being applied... (I think?) |
Why are you passing them as environment variables (I'm not familiar with kubernetes)? Edit them directly in the config.php of ruTorrent. |
@Jolly-Pirate because I'm running the container from @crazy-max and container storage is ephemeral. Environment variables are how things like this are configured (in this case). Editing config.php would be wiped next time it re-initialised. The do_diagnostics variable (as well as a whole bunch of others) was passed as an environment variable as part of how it is configured via IaC (Infrastructure as Code) in the YAML Manifest. You might actually like containers ;) Worth learning IMO! |
@BloodyIron the config setting for the crazy max docker image is currently hard coded and not yet customizable. Refer to my comment above |
I know what containers are, and I use docker a lot (never used kubernetes though). So in our case, I'm using https://github.com/romancin/rutorrent-docker. It has all plugins added and works nicely. The configuration files are mapped to a host folder, so I can edit them as I please. If you want to try it, the |
@BloodyIron you can't just pass arbitrary environment variables and expect that the container will know what to do with them. Env variables need to be mapped by the container somehow, or explicitly mapped in PHP to use xyz variable from the environment with a default fall back if undefined. In the case of the container you're using, the environment variables are mapped to their proper locations on container initialization with a script: https://github.com/crazy-max/docker-rtorrent-rutorrent/blob/master/rootfs/etc/cont-init.d/03-config.sh The only variables supported would be items which have actions in the init script above ruT config starts here: https://github.com/crazy-max/docker-rtorrent-rutorrent/blob/master/rootfs/etc/cont-init.d/03-config.sh#L199 Notice the hard coded values which you can't override with the environment (which blueberryapple has already pointed out) |
This value should be set to false by default. The speed regression is due to the patched caching issues. Also, your very first load will be slower, as it's required to regenerate the binary path caches. Afterwards, they are saved to If users would like to customize this variable, there should be a configuration value added to the @crazy-max docker image. However, there should be an implied warning that it may cause caching issues when upgrading versions. |
okay so... I'm still having the slow performance, am I waiting to test more changes upcoming or something? I'm not sure if there's something specifically for me to do at this time. And yeah, I see what the above comments are saying about this variable not being handled in the same way, in my case. |
@BloodyIron Consider trying the latest version of docker-ruTorrent. Change the environment variable Optionally, you can change Other users have reported loading times between 300ms to 500ms on the 2nd load. If this resolves your problem, I'm going to close off the issue report. The caching issue is still present in rare scenarios, but we have taken significant steps to mitigate it. |
@stickz switched to the latest image, serving v4.0.4. Added the RU_CACHED_PLUGIN_LOADING = true environment variable. Forcefully cleared cache, first load very slow, as to be expected. Subsequent load times are in the realm of 1.9 seconds. Substantial improvement over 7 seconds. When I analyse the debug, network load waterfall, it seems "action.php" in two parts is the "slow" part of the load. Not sure if I was having it slow before, or if this is new/regression. This is, for sure, a substantial improvement. Do you want us to proceed to explore the action.php aspect, have me open a new issue/ticket, or what? I do really appreciate your hard work, and the work of others on this matter! This does help me plenty :) So, as you may have already noticed, I do try to help out where I can in my own way. Anyways, please let me know your thoughts. Thanks again! :) |
@BloodyIron Thanks for your help testing. I'm going to go ahead and close this issue report, since the problem with Please feel free to open a new issue report with fresh information about the |
@stickz actually, I just observed an issue again with getplugins.php so maybe let's discuss that a touch more. So, my computer just rebooted for $reasons, and I went to my ruTorrent webGUI. Surprise surprise, getplugins.php took 6.42 seconds to load. Now, I haven't refreshed any cache in my browser (for the ruTorrent webGUI website), the docker container has not restarted, or anything like that. So as far as I can tell, this should have been the earlier observed 1.9 seconds of load time (or in that realm). And yes, same browser that I use to access it. I have not changed any configuration, or other stuff, about the environment, since I did the previous change to v4.0.4. Um... unsure how to reliably reproduce this, but... what are your thoughts on this? :s I can create another issue/ticket once this is sorted/figured out or whatever, for action.php, but I'm going to hold off considering this new result sample. |
Yeah, okay so additional information. Same browser session, I open a new tab, go to google.com, hit F12 to open console so I can watch network load, go to ruTorrent webGUI again... and yeah, getplugins.php took 5 seconds to load. I did not close the window, refresh cache or anything like that, just new tab, steps described above. Something still seems not quite right. |
@BloodyIron The default cache duration is 3 hours.
|
@stickz aha! I'll try that and report back if any issues crop up related to getplugins.php ;) I had not realised the cache, by default, was as low as 3hr! I'll also open a new issue for the action.php matter Again, thanks for your help and work on all this! Yay! :D |
Please complete the following tasks.
Tell us about your environment
Vivaldi, browser
Using: crazymax/rtorrent-rutorrent:latest
Tell us how you installed ruTorrent
crazymax/rtorrent-rutorrent:latest (k8s in yaml manifest via argoCD)
Describe the bug
When loading the webGUI getplugins.php takes 5.7 seconds to load EVERY time, and the page takes that long to load EVERY time.
Steps to reproduce
Literally load the page or refresh
Expected behavior
Load time in the realm of 5-15ms
Additional context
Original thread in other repo : crazy-max/docker-rtorrent-rutorrent#182
The text was updated successfully, but these errors were encountered: