Opening hundreds of tabs in client browser by using server's RAM
Removed before it was archived.
Edited 12 Jul 2021. We only hold this version.
About this post
- Posted
- Archived
- Removed on
- Edited
- Score
- 74 · 88% up
- Kind
- Text
- ID
- oilaug
Removed before it was archived.
Edited 12 Jul 2021. We only hold this version.
50 comments
How about something like x11vnc, which runs a remote desktop w/o an actual desktop?
Deleted before we saved it.
You could try x2go, it works much better than x11vnc, both forwarding the whole desktop or a single application. And yes, you could use multiple windows without problems.
Edit: and also with multiple screens
Edit2: BTW, do not expect stellar performances, the server still have to compress the video and send it to you: it is difficult with modern, complex, applications to forward the primitives as it would be with simple applications using the X directives (or whatever they are called) and thus it is simpler to send the video feed most of the times.
But yes, it would "work".
If I understood the task correctly, xpra would be a better choise than vnc, if you wanted to attack the problem this way.
Why do you want to do this?
Deleted before we saved it.
Deleted before we saved it.
Deleted before we saved it.
to increase the data companies can collect and store on us, of course
Deleted before we saved it.
Just forward your X session over SSH, and open the browser from the CLI on the server. It will display on your local client.
This doesn't need VNC or RDP or any of that other nonsense - it's literally what X11 was developed for.
ETA: I am absolutely flabberghasted that nobody has suggested this very basic step yet. Is it that folks don't know how to use X11?
this answer has the basics.
I was surprised as well. 😂
Deleted before we saved it.
Deleted before we saved it.
That's up the the browser and your local Xserver.
(Also, this is why when talking about applications in X11, the terms "client" and "server" are backwards: your local machine is "serving" the X-Windows services up to the "client" - the graphical application, which is running on the remote system, using its resources)
I don't think caching will really work. At some point the client will have to get the websites open and they will be in their ram.
I think the best solution is to use a sufficient swap partition for the client (if the underlying storage medium is an ssd).
Alternatively you could create a swap partition on the server either as a ramdisk or on a ssd, and do a network mount of it on the client. Creating it in ram does not make much sense as the speed benefits will probably get negated by the network transmission. But a network mounted swap could be interesting.
hope this gives you some ideas to research and experiment with
Deleted before we saved it.
Deleted before we saved it.
Deleted before we saved it.
You could try ThinLinc and use your client just as a client and run everything on the remote server. Here's a comparison video that I made comparing it to other applications (https://youtu.be/xBs0M8-XTJo - I'm literally opening a web browser with hundreds of tabs on the remote machine...).
It won't have impact on the client machine since its client application is very lightweight on resources (I could've used a raspberry pi 2 as a client and have the same output).
Oh, and it will work fine fine if your client has multiple monitors.
Deleted before we saved it.
Sorry, I was busy for the last three days and didn't notice your answer.
Yup, I'm sure... on the video I'm not using two monitors, just only one. But here are some pics when using ThinLinc client (Windows client acessing remote LXDE Linux):
https://imgur.com/TMBcczB.png - VNC-1 and 0 are booth my local physical monitors being detected at the remote machine.
https://imgur.com/NzmWALu.png - Remote machine being displayed on two monitors.
PS: I had a problem when using LXDE as desktop environment at client... for some reason, LXDE at ThinLinc client sent only one very wide monitor to remote machine, hahahah. But I managed to stretch the screen across both monitors by using ThinLinc clent application on windowed mode: check this out...
https://imgur.com/pRERMNl.png - dual monitors on ThinLinc client (on Linux client using LXDE).
https://imgur.com/7fPxHDh.png - ThinLinc client on Linux LXDE streched across dual monitors.
It doesn't happen on Windows version of ThinLinc client (see first two pictures) and I believe that it also won't be a problem on other more advanced DE such as KDE or Gnome and maybe even XFCE and Cinnamon. I don't have any other DE installed here right now, but if you want me to try for you, I could install it here and report back to you. But in short, if your client machine has two or more monitors, you can use them and your remote should be able to use all of them as separate monitors like if you were working locally.
Deleted before we saved it.
well, for "ssh -CYA" we get:
-C is for compression. You're right, it should be a little bit better because it will compress data and will save some bandwidth...
-A is related to ssh-agent... ssh-agent is just like when you know that you're going to connect a lot of times to the same server and don't want to type your password every time. It should be irrelevant.
and the difference between -X and -Y... well, according to the ssh manual:
-X Enables X11 forwarding. This can also be specified on a per-host basis in a configuration file.X11 forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the user's X authorization database) can access the local X11 display through the forwarded connection. An attacker may then be able to perform activities such as key‐stroke monitoring.For this reason, X11 forwarding is subjected to X11 SECURITY extension restrictions by default. Please refer to the ssh -Y option and the ForwardX11Trusted directive in ssh_config(5) for more information.-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.So, I guess that X or Y it won't interfere in performance as well.
I did a short test here and I can assure you that ssh -CYA (or ssh -XC or ssh -CY) is still as bad as my ssh -X test performed on 20ms latency 250MB/10MB connection to my remote PC. And it also doesn't have sound being forwarded... so, with or without compression. Since SSH -X or -CYA or a (mix of them) doesn't require you to install nothing else, except ssh-server itself, I guess that you can check it for yourself and compare to my video performance... But if you want me to record a video comparing ssh -XC (or -YC) vs ThinLinc, just ask me and I'll record one for you.
I feel like this question might need a bit of clarification. Are you looking to off-load storing data in RAM from a client device to the web-server? Or to a 2nd server that's primary purpose is to provide additional RAM? Maybe providing additional information about the "hundreds of webpages in browser tabs" use-case might help here too. What's the reason why 100s of web-pages would all need to be open and accessible in the browser at the same time (or multiple browser instances)?
If this is for testing purposes, you might consider setting up a browser along with some tools for testing fully in a server environment, and just off-load your workload there.
Deleted before we saved it.
Swap would be a much better option than server ram. If that's not an option, maybe you could use swap with a network drive, like NFS?
There's an application called mighty app that does exactly this. I believe they're on beta.
It's not libre.
Well it's possible, but honestly what you want to do is have background tabs/processes frozen or killed (with some small state information saved) and reload as necessary.
Deleted before we saved it.
Well modify the browser source code to do that. I believe Chromium was working towards that, and it's something that would be especially useful for mobile devices.
I think this extension does something similar: https://add0n.com/tab-discard.html
So basically like game streaming services? The game runs on the server and only what would be shown on the screen gets sent to your browser to display
Deleted before we saved it.
This is actually an idea that I have had kicking around in my head for a while -- something like an evolution of RDP or VNC, where it is program specific, and instead of streaming everything, you would need the same application installed on both ends, and it would stream just the bits that were needed to display whatever will be on the screen in that app. That way, text rendering and whatnot could still happen on the client, and be super crisp, static images could just be passed straight through, video streams could be piped through at full quality, etc.
With a bit of work, this could even work for games. Maybe have the backend render layers of images, and then stream those, alone with the depth buffer. Then have the client apply some post-processing and pull the layers together. That way, you won't get compression artifacts across the whole image, and the client side post-processing will smooth things out a lot. Then maybe instead of streaming every frame, you can just pass instructions on how to manipulate the layers, or send new layers. This would free up the streaming bandwidth to send stuff at far higher quality. This would also give the client limited abilities to make things interactive with the user's input before even sending it out -- they might be able to start moving the character model on screen subtly when you press an input, before it has even gone out to the server. The lighting will not be quite right when the character first starts moving, but just having something happen on screen immediately will make the game feel like there is less latency.
Well... that is how multiplayer games have always worked...
No, it isn’t — everything is still fully rendered on the client. I am talking about something different, like VSCode headless but deeper and more generalized. For games it would be more that the server was still doing the hard work of rendering it, but leaving some compositing and post processing to the client.
Deleted before we saved it.
Deleted before we saved it.
Ah, reminds me of my long past Solaris days using xdmcp. As I recall, it requires an Xserver on the client, but all the processing happens on the server side. Not sure its a viable option.
Unless you’re using the server connected over LAN as a cache server, there really isn’t a point. It wouldn’t be much faster than just unloading certain tabs when they aren’t in use. I wouldn’t know how to do this, but it probably would be a better idea to just use a VM.