Share RAM over network

49

13

My colleague is using an application that consumes a lot of memory which makes the system too slow. Is it possible to share memory with other PCs over the Internet?

The system has 8 GB of RAM, and the application consumes more than 6 GB.

Innov

Posted 2018-02-22T10:59:46.020

Reputation: 689

Comments are not for extended discussion; this conversation has been moved to chat.

– Sathyajith Bhat – 2018-02-23T04:19:03.653

5Run it on a high-powered server via Remote Desktop, or VNC, or X11 ?? – WGroleau – 2018-02-23T05:19:12.743

3You're better off using large storage drives (HDDs or SSDs) as cache, as answers mentioned already. – Firebug – 2018-02-23T16:34:18.037

12

for future reference: Table of latency numbers which everyone [who does computers] should know.

– Nick Alexeev – 2018-02-24T04:50:47.347

79You might have more luck downloading more RAM... – user541686 – 2018-02-24T05:44:34.593

1What kind of PC? A laptop? – Peter Mortensen – 2018-02-24T12:01:15.007

It's possible in Windows 7 at least to assign a drive letter to a network path. And you can set a page file size per drive letter. So in theory it should be possible, but I didn't test it (yet). – Fabian Röling – 2018-02-24T13:21:35.003

4Modern versions of windows allow you to use USB sticks or SD cards to improve performance. Does not actually mean that the device is used as RAM but something that performs between RAM and platter based hard drive. – Salman A – 2018-02-24T15:28:16.760

1ReadyBoost was my first thought. But has anyone ever actually got it to "improve performance" ? Every stick I've ever tried says it won't help. something between RAM and platter based hard drive... aka, an SSD ;) – Mazura – 2018-02-27T01:17:48.197

Method 1: install additional 8GB RAM. Method 2: optimize the program to use 1GB (I don't think that memory usage is optimal when the programmer discusses such questions). – i486 – 2018-02-27T10:14:21.910

3@Fabian Pagefile has to be on a local drive. You can't set it to a network drive. Drive-letter has nothing to do with that. – Tonny – 2018-02-27T13:55:29.943

2

@Mehrdad You forgot the link! https://downloadmoreram.com/

– thanby – 2018-02-28T17:31:05.857

1@thanby: I omitted it deliberately; I thought it'd (counterintuitively) be funnier without it. I assume a lot of people have already heard the joke, and jokes aren't as funny when it seems like you're trying to share them for the first time to people who've already heard them, but that's how it would come across with the link. – user541686 – 2018-03-01T09:52:05.080

Answers

166

I've only considered a standalone application that runs on a "standard" machine with no ability to simply install it elsewhere or use specialist hardware or software. Other answers (correctly) address software migration or dedicated hardware for the task.

Any way to "share RAM" via a network will be subject to limitations of that network medium. As even gigabit Ethernet is limited to approximately 100MB/s (megabytes) this means that your "RAM" speed will be limited too.

100MB/s is a tiny fraction of the speed of the RAM that is actually in your system. Your program will be painfully slow and feel like it is running on a computer from the early 90's

Modern hard drives are, for sequential read and write, slightly faster than this. SSDs are several times faster.

This is ignoring latency problems which will make your program an order of magnitude slower again.

Due to the slowness and other technical issues involved this is a not an issue anyone has ever likely considered to be worth attempting to solve for "home" or "office" systems. It's cheaper and more effective to buy more RAM if it is needed.

Just buy more RAM, or even an SSD for a page file. There is no other way to do this that does not require an insane amount of work or hardware for little benefit.

Mokubai

Posted 2018-02-22T10:59:46.020

Reputation: 64 434

So many factors at play. Read about Deans numbers and memcached and consider re-designing the memory-hungry app.

– MarkHu – 2018-02-22T21:28:36.593

50Swapping / paging over gigabit ethernet can have lower latency than a pagefile on a local magnetic disk. e.g. 10 ms disk latency vs. well under 1ms ping time for local ethernet. If the file server holding the pagefile (or iSCSI device you're swapping to) keeps it hot in its RAM, you potentially win. IDK if Windows supports paging to a network file. (I'm pretty sure Linux does, but this is a Windows question). Oh, just saw that the question says "over the Internet", so nvm. – Peter Cordes – 2018-02-22T21:39:41.727

2@MarkHu Given this was asked on Super User, I don't think the asker has any control over the code of the software being used. – oldmud0 – 2018-02-22T21:40:28.353

Right you may be, @oldmud0 ... I misread the OP as "My colleague is creating an application that consumes a lot of memory..." – MarkHu – 2018-02-22T22:21:47.063

2@PeterCordes What you describe is still a loss over buying more RAM or an SSD. And even more certainly so in Windows. ;) – jpmc26 – 2018-02-23T07:47:24.127

In other words, YES, it's possible (hypervisors do this for short bursts to live-migrate VMs), but only if you want your program to run very much SLOWER. – Joel Coehoorn – 2018-02-23T15:19:49.760

1@JoelCoehoorn or cost several orders of magnitude more than a simple memory or disk upgrade – Mokubai – 2018-02-23T15:50:56.200

@jpmc26: worse performance yes of course, but if you already have another machine which could act as a server, then it's a cost vs. performance tradeoff. (If you don't value the time it would take to set this up.) – Peter Cordes – 2018-02-23T15:56:28.900

1@PeterCordes Except time is money. You'll pay for it anyway with your employee sitting there waiting for the computer in the long run. – jpmc26 – 2018-02-23T19:47:53.727

@jpmc26: yes, that's why I added the last sentence of my last comment. Buying more RAM is obviously by far the best option. It's more of a "fun fact" that swapping over gigE might be better than swapping to a magnetic HD, but really you don't want to do either of those things. Anyway, swapping is usually a pretty random access pattern, so this answer doesn't do a very good job of describing the numbers. Magnetic HD sequential read/write bandwidth isn't what matters. – Peter Cordes – 2018-02-23T19:55:13.890

"even gigabit Ethernet" - you make it sound like that is fast. Gigabit is low end workstation style ethernet. Current standards are 25G (25 gigabit) and 100G (100 gigabit) - but for things like that you would use Inifiniband (which ahs VERY low latencies, still large compared to real RAM). In this area, "even 1gigabit" is like saying "even a Fiat Panda is slow on the fomula one" - it is low end. – TomTom – 2018-02-23T21:09:02.120

12@TomTom for home and "normal" office use gigabit is still pretty much what you get at your desktop machine. Just because 25G and 100G are common (or at least availbale) for backbone infrastructure does not mean you are likely to see it on the desktop. I can't even find a desktop 10GigE card at any local supplier at a reasonable cost, let alone a 25GigE. 10GigE cards are about 4 times the cost of an 8GB memory stick here. I know which I'd consider a reasonable upgrade. – Mokubai – 2018-02-23T21:21:37.287

@Mokubai Yes, but it still is low end. People also do not drive formula one cars on roads and still noone things a Fiat Panda is fast. Provide proper context. 1g is lower end. And I have seen companies pushing for 10g to the desktop (mostly without brain, truly). 10 cards are quite reasonabily priced - evn 25G is cheap, btw. - not "20$" but that is not reasonable for high end like for video editing workstations. Couple of hundred and you are good for 25G. The Dual 25G SFP28 cards I am just buying are below 300€. I remember a time paying more for gigabit. – TomTom – 2018-02-23T21:23:51.563

11"feel like it is running on a computer from the early 90's" — strange, computers from the 90s felt much faster than computers feel today. – Jeremy Visser – 2018-02-23T22:22:10.190

1@PeterCordes: It's funny that you emphasized magnetic disk rather than magnetic disk, seeing as how the magnetism doesn't really have much to do with it... – user541686 – 2018-02-24T05:46:18.467

1@Mehrdad: Ok, then rotating disk, as opposed to SSD. The rotation does have a lot to do with random access latency being multiple orders of magnitude worse on spinning rust vs. an SSD. An SSD is still called a disk, even though the storage medium is not physically disc-shaped. Swapping to an SSD is obviously still much slower than having enough RAM not to swap at all (or to swap much less), but only an SSD is going to be faster than swapping over gigE switch to a swap file that's hot in RAM on the file server (nbd, iSCSI, or whatever). – Peter Cordes – 2018-02-24T06:07:41.013

1@PeterCordes: I've never heard an SSD be called a "disk" except in contexts where code hasn't been bothered to be updated to make the distinction, but okay. – user541686 – 2018-02-24T06:22:28.987

2@Mehrdad: SSD stands for "solid state disk". If you're talking about fsync, you'd say it doesn't return until data is on disk, even though you know that's often an SSD these days. "disk" is just convenient short-hand for non-volatile storage in some contexts. In this context, I think it means "whatever the computer keeps its OS filesystem on" (and thus would normally expect it to swap to). – Peter Cordes – 2018-02-24T07:01:27.173

2@PeterCordes The D in SSD stands for "Drive". The first D in HDD stands for "Disk". HDD is "Hard Disk Drive". – Nelson – 2018-02-24T15:30:29.100

Windows will not allow paging to a network drive. – Jamie Hanrahan – 2018-02-25T02:03:01.180

1@PeterCordes I've done that back in the days of Windows 3.0 running in Standard Mode, which does allow a limited form of paging to a network drive, and I can confirm that it was at that time faster than paging to the local magnetic disk. – Neil – 2018-02-25T10:38:45.463

And BTW, using both a local and network swap file in parallel might give you approximately the sum of their throughputs. But don't expect the OS to be smart about choosing the local magnetic HD for larger contiguous page-out / in and using the remote for more scattered eviction / reload. – Peter Cordes – 2018-02-25T18:38:27.793

1"Modern hard drives are, for sequential read and write, slightly faster than this. SSDs are several times faster." SSDs are modern hard drives, colloquially. I'd recommend clarifying this by saying "Modern hard disk drives" – TylerH – 2018-02-26T20:11:27.717

75

Just for completeness: InfiniBand allows direct access to the memory of other machines.

However, it requires:

  • An InfiniBand switch
  • A InfiniBand add on card in each machine
  • The application has to be programmed specifically to use this

It does NOT work over an existing network, it requires a completely independent infrastructure for all connected nodes. It also does NOT work over the Internet

Gerald Schneider

Posted 2018-02-22T10:59:46.020

Reputation: 914

53It is also certainly a lot more expensive than just getting another 8 GiB or so of RAM :-). – sleske – 2018-02-22T14:55:34.853

40Oh, only by one order of magnitude or so ;) – Gerald Schneider – 2018-02-22T14:57:48.853

Firewire DMA, maybe? – rackandboneman – 2018-02-22T16:02:57.177

7You don't need infiniband, RoCE is also possible. However, this does require NICs that support RDMA and probably a new switch to support the NICs, and an application programmed to use RDMA. – alex.forencich – 2018-02-22T19:48:33.027

7+1 because it is a great and correct but -- for this situation -- totally useless answer :-) – daniel.neumann – 2018-02-22T21:39:20.957

1You do - unless you get 25G or 100G which are more expensive. RDMA does not solve the latency issue. – TomTom – 2018-02-23T21:09:36.377

1

Older Infiniband equipment is not actually that expensive, unless some of this old stuff is no longer available. http://blog.patshead.com/2016/04/infiniband-an-inexpensive-performance-boost-for-your-home-network.html

– LawrenceC – 2018-02-25T01:39:14.210

you don't need dedicated hardware at all, i did this on linux years ago, using a "network block device" to mount a remote harddrive locally, and setting that up as a swap partition. worked fine. not sure how to do that in windows, but if linux can do it, i'd be surprised if windows can't. – hanshenrik – 2018-02-25T13:17:56.857

1@daniel.neumann Technically correct, the best kind of correct. – Alexander – 2018-02-27T11:51:36.710

@hanshenrik That would be iSCSI. WIndows 7 and later have a free iSCSI client (Windows 10 Pro has it buildin even), but an iSCSI target (the other side) is still paid for software (or free if you got a Linux box or a NAS that provides it). And, unless you run it over 10 Gb/s LAN, it is still slower than normal swap on local SATA disk. – Tonny – 2018-02-27T14:01:59.697

@alex.forencich RoCE will do RDMA over ethernet, it is worth noting however that Ethernets implementation of RDMA is lacking compared to Infinbands. The latency difference means that RoCE is not always a viable option especially in HPC with large engineering apps. – alpha – 2018-02-28T15:00:28.930

19

Is there any alternative solution?

This depends highly on the nature of the data.

You could run 2 different mysql servers on 2 different machines.

Then divide the data in 1/2 and write the program to automatically know which server to go to.

Of course this can be scaled to any number of servers if you have them available.

cybernard

Posted 2018-02-22T10:59:46.020

Reputation: 11 200

I had considered mentioning that generally the way that we "share memory" is by actively moving the application to another machine and then working with it remotely via whatever methods are available. It is definitely an alternative to buying more memory, especially if another machine is already available. +1 – Mokubai – 2018-02-22T14:13:22.627

1Like a remote desktop? – Innov – 2018-02-22T15:47:12.933

4You have 2 computers running separate OS, and each one has a copy of mysql running. So computer #1 could be 192.168.0.1 and computer #2 192.168.0.2 (or whatever.) On your main PC you can now to both of those IP to retrieve your data. Mysql or its free replacement mariadb offers libraries like libmysql to add to your program so it has native access to mysql. This is not a remote desktop, its client-server and/or client and multiple server relationship. – cybernard – 2018-02-22T16:54:33.817

15

Yes, it's reasonably easy to do (and I've done this, for diskless systems needing swap), using Network Block Device protocol.

Install nbd-server on the server machine, and configure it to auto-create per-hosts files.

Ensure your client machines have NBD compiled into their kernels, and then configure them to swap to an NBD-mounted device. The nbd-client package can help.

Sorry if the above is a little vague - The machines I've done this on are not reachable from here; I may be able to fill in the details when I have access to them.

There's an alternative NBD server implementation called nbdkit; I don't know anything about it.

Toby Speight

Posted 2018-02-22T10:59:46.020

Reputation: 4 090

I've just spotted that the question has a Windows tag. I don't know anything about Windows - sorry. – Toby Speight – 2018-02-22T17:38:33.127

8+1, swapping over GigE on a LAN should be lower latency than a local magnetic hard driver, if the file-server you're swapping to keeps the swap file cached in its RAM. HD seek times of ~10ms vs. LAN ping times of ~0.25 ms. No idea if Windows can do anything similar e.g. with a page file over Windows File Sharing (SMB) or any other protocol, but maybe iSCSI could work. The OP mentions "over the Internet"; that wouldn't be a good idea. Unless your ping time is lower than your HD random-access latency, it's not a win. – Peter Cordes – 2018-02-22T21:45:44.537

I don't see how this qualifies as "additional RAM". It's no different than dumping some data to a file on a local disk, no? – ivan_pozdeev – 2018-02-25T07:50:49.167

For a Wndows client, one can share a block device in Linux via Samba and mount it as a disk in Windows with ImDisk (size will need to be specified manually). – ivan_pozdeev – 2018-02-25T07:51:43.987

i've also done this in the past on Linux, although i used my own nbd server-client implementation, it worked fine to use the nbd block device as a swap partition. – hanshenrik – 2018-02-25T13:14:14.203

9

Given the small, unimportant details "Windows 10, workstation has 8G B RAM", there is really only one sane answer: Buy more RAM and run less crap.

Buying an SSD and putting the page file there would be the next best option, but really... buy more RAM.

Serving the page file ("share memory") over the network is of course possible, but it is a very bad idea. While it's true that there exist borderline cases where access time over network will be better than accessing a local drive, that's irrelevant for your usage case, because you need consistent low access time and high bandwidth at the same time. Remember, you're not anticipating one or two page faults, you're constantly swapping. Unless you are willing to pay a couple of thousands, there is no way you will be getting anywhere close to buying RAM or an SSD.

8 GB is not nearly enough to run Windows 10 and a memory-hungry application at the same time. It's barely enough for running Word, Excel and Outlook at the same time. That's exactly the typical completely unusable "total bullshit corporate setup" which millions of people have to live with every day on their work laptops. Invest 100-200 currency in another memory module, and it amortizes its cost within a week (things that took minutes now take seconds, and time is money -- unluckily this is often hard to get into the head of your local bean counter).

Alternatively, if you own the machine, you may use NTLite to cut down on the Windows 10 crap, reducing its memory footprint. Or, you might just turn off 80% of the mostly unnecessary services. It seems unbelievable, but it is possible to run a recent version of Windows with under 2 GB of RAM used.

But really, just buy RAM... it's so much faster and easier than spending hours of your precious time on cutting down the Windows crap.

Damon

Posted 2018-02-22T10:59:46.020

Reputation: 4 002

2Is windows really that bad on ram? I'm running Debian with the complete system in ram (no physical drive) and can have dozens of open web browser tabs, LibreOffice text & spreadsheets, gimp photo editing, and watch a video or listen to music, leaving about 3 gigs of free space for programs or files, all on 8GB total. I'm not a win-hater, but from your words the "total BS corporate setup" sounds a lot like windows itself... – Xen2050 – 2018-02-23T19:10:13.303

1Well, that is disputable - the OP has it right. LAst time I purchased 8gb machiens was around 2010. This is 2017. Applications using 16gb memory are not that rare in certain fields (hint: not writing emails and no, word is also fine, most people do not write novels on it). This is a small investment - 16gb memory is a freaking lunch or something. – TomTom – 2018-02-23T21:14:08.603

7@Xen2050 I was wondering if it is really that bad, so on my 6GB Windows 10 machine I opened Outlook, Excel, Word, Edge, I've got a very small instance of SQL Server running, Malwarebytes seems to be doing something with 170MB, I opened Visual Studio 2017, I've got Firefox open here, and I'm at 65% memory use and Windows has not even had to start using compressed memory. So, IME, Windows 10 runs fine with less than 8GB of RAM and, anyway, Damon's apparent dislike of Windows is irrelevant to the answer. – Andrew Morton – 2018-02-24T17:56:15.877

1@Damon: But unless you did some sort of analysis on what was consuming the extra RAM, there's no basis for blaming it on "the Windows crap" vs "the aftermarket crap installed by the employer". Since plenty of people (including myself) have done memory-intensive calculations, on Windows 7, Windows 8.x, and Windows 10, without that kind of issue, it strongly suggests (but does not prove) that the culprit isn't part of Windows itself. – Ben Voigt – 2018-02-26T14:54:38.050

6

A simple alternative would be to run the application on the remote PC, possibly under a dedicated user account, and simply control it via RDP, VNC or whatever is convenient.

rackandboneman

Posted 2018-02-22T10:59:46.020

Reputation: 670

If the remote PC has enough ram... – LateralTerminal – 2018-02-23T18:08:28.893

1@LateralTerminal That's implied. – Clonkex – 2018-02-27T04:28:01.350

2Yeah, merging the RAM of two machines over a network ... net won't work, not for ordinary applications (the square, grey kind with buttons and menus). – rackandboneman – 2018-02-27T11:10:23.060

6

Another option is to temporarily deploy the application in an environment where ram can be scaled up or down easily.

I'd look at an Amazon AWS instance, which can be changed in size with one reboot.

IE a small instance like a C5.large has 4GB ram and 2 cores, and costs $2.04 USD a day for linux, or $4.26 USD a day for a windows install. EBS disk space is an extra cost and scales linearly with GB allocated.

You can set up your system in this smaller size, and then when you want to go full noise, stop it, change the instance size, and run the software.

  • m5.4xlarge is 64 GB ram and 16 cores, for $18.44 USD/day or $36.10 USD/day for windows.
  • r4.8xlarge is 244 GB and 32 cores, for $51.07 USD/day or $86.40 USD/day with windows.
  • x1.32xlarge is 1952 GB and 128 cores, for $320.12 USD/day or $461.43/day with windows

Or the biggest one...

  • x1e.32xlarge is 3904 GB and 128 cores, for $640.52 USD/day or $781.82/day with windows. If your colleague needs more than this then the problem needs rewriting in a more-optimal way.

https://www.ec2instances.info/ will help you pick a suitable size. Note some locations cost more than others. Singapore and Northern California are expensive. However your VM costs nothing when its not running, other than disk storage costs.

The downside is that if you need this memory for a long time, buying VM time is an expensive way to do it. However accountants seem to sometimes prefer operational costs like rental, to capital costs like upgrades.

Criggie

Posted 2018-02-22T10:59:46.020

Reputation: 985

1I realise that this answer isn't addressing "accessing ram over the network" as per OP's request. It is more like accessing a remote host which has more ram. However knowing how budgets work in some places this may be a valid solution to get the job done in a fundable way. – Criggie – 2018-02-26T02:28:01.903

4

As others have said it's technically possible but not worth it.

However if you want to speed up the use of your computer, it is possible to externalize some of your applications to a remote server.

This will mostly depend what you are working on and what application you use. If you are running programs that requires a lot of processing time for a small data output, you could make them run on a server different from your computer to save time and ressources while you work on something else.

The example I have in mind is a server that tests my code every time I push a modification. The idea with such a solution is that it is limited to specific use cases.

everyone

Posted 2018-02-22T10:59:46.020

Reputation: 141

4

Ask IT to buy more RAM for your PC, and demonstrate the need using a screenshot of the app's usage in Task Manager.

Christopher Hostage

Posted 2018-02-22T10:59:46.020

Reputation: 4 751

4Practical solution... even asking IT to temporarily swap in more ram from other systems should be a "free" answer. – Xen2050 – 2018-02-23T19:11:24.897

2@Xen2050 Meanwhile you colleague is crying because his system no longer boots. – Willtech – 2018-02-24T09:46:50.593

3@Willtech it's normal and proper for IT to maintain spares of all parts, and spares of whole working systems. Downtime is the real cost. – Christopher Hostage – 2018-02-24T17:11:51.503

3

There is a commercial solution for this, via a company called Kove (http://kove.net/). It requires an Infiniband infrastructure to work on the "backplane" (ethernet works normally), although other options like RoCE can sometimes be made available, depending upon specifics. They provide a number of transparent interfaces to allow zero code change integration, and APIs for kernel bypass with more direct CPU access (i.e., avoiding kernel overhead). In terms of performance, it depends on your application. If you are CPU bound, then the impact could be minimal (which can be surprising). If you are memory bandwidth bound on the local host, they'll give you larger memory, but you'll be throttled by the already existing bottleneck. In this case, is it advantageous to the workload to have larger memory than can be put in a box, and not run out of RAM? We have seen (very) good results with virtualization and python machine learning libraries. High end HPC applications tend to fair worse, but we have used the C APIs and managed to keep the performance hit acceptable while reducing node count (the nodes were there for the RAM, not the CPU cycles), which is a plus compared to MPI. Whether this is a good solution for your colleague is hard to tell, but it is an option you can look into. Hope that helps. To be clear, I do not work for Kove, and have no financial incentive, but I have collaborated with them for a number of years and think this technology has the potential to substantially impact the way certain computing is done.

Bill

Posted 2018-02-22T10:59:46.020

Reputation: 31

Howmany Gigabytes of memory can you buy for the infinityband setup? – joojaa – 2018-02-23T20:39:33.950

Yeah, the main issue here is the little point that he talks about having 8gb memory only and needing 16. This is not "How do I use remote ram" but "why the heck do I use a system that has 10 year old specs". – TomTom – 2018-02-23T21:12:07.380

@jooja We have 6TB. Based on what we have seen, we haven't seen a limit. You can keep adding additional remote RAM appliances. It seems to scale fairly linearly, so it is an engineering/cost problem. We designed a 1PB system once on paper, but obviously couldn't field that to test it. – Bill – 2018-02-24T02:56:03.803

@TomTom I didn't see the comment about 8GB, but yes, clearly if we are talking 8GB vs. 16GB of RAM, a few $K for a new machine will solve the problem. – Bill – 2018-02-24T02:58:12.790

Heck, for a few $hundred, you can probably upgrade the RAM to 32GB, unless the motherboard is ridiculously old and limited. – fluffy – 2018-02-24T09:29:56.667

Likely 4x4 is possible - 16gb. That would be what I was buying around 2010 for developers. But yeah, it is comically low in terms of RAM. – TomTom – 2018-02-24T09:58:10.703

2

Another point of view - maybe the problem isn't the limit on system resources, but the wasteful application your friend is writing. 6 GB of RAM is awful lot of memory.

Just because many of the other apps are overly bloated, does not necessarily means your friend application needs to be one of them. Using different programming methods can reduce memory requirements while improving speed. For example, if app loads whole dataset in memory and then works on it will be much more wasteful than for example storing data in (local or remote) SQL database with few select indexes and accessing it over there. Make it process data block-by-block if possible, instead of loading it all at once. In-memory structures could be wasteful too. Free memory when you're done with it. Do not load in into RAM what you can memory map instead. And hundreds of other tips...

If application however really needs more memory which needs to be stored on other computers, it can be modified to use memcached and the like to store it there. Bonus points as it will scale better in the future.

Matija Nalis

Posted 2018-02-22T10:59:46.020

Reputation: 2 107

56gb of memory is not an awful lot depending on application. Even end users do photo editing (photoshop loves RAM and a high end camera shoots 64 megapixel images), Video Editing (MUCH worse), then there is mathematical work. Heck, even excel will gladly use a couple of GB. Not everyone is writing emails, using twitter and other such things. – TomTom – 2018-02-24T09:59:18.470

@TomTom if you need high megapixel processing, you will be having high memory requirements (by nature of the request). But unless you're doing DNA genome splicing in your Excel sheet and it is still using a couple of GB RAM, that it is exactly the kind of bloat and sloppy programming that I'm talking about. You know, like, your home budget was happily being processed as fast (or faster) in Lotus 1-2-3 few decades ago on machines with 3 orders of magnitude less RAM (and at least hundreds of times slower processors) than your Excel of today. – Matija Nalis – 2018-02-25T04:03:32.753

1Whow, what an ignorant anser. I can only assume you have very little experience with what people use excel for. WHen Microsoft made the 64 bit version of Office they said there is little use for it - EXCEPT for Access and Excel as there are some people (mostly managers) running brutally large analysis via Excel, using up many gigabytes of memory. The flexibility of Excel and the approachability for non-programmers makes it their go to tool (statisticians tend to be trained in using R). I have personally seen 200 sheet excel files by some finance people. – TomTom – 2018-02-25T11:38:10.630

If your home budget takes a long time to calculate in Excel, you're a lot richer than I am. Interesting question on Excel vs 1-2-3 - the core calc loop may well be faster in 1-2-3 because it doesn't do as much. But on a multi-core machine, Excel will easily beat 1-2-3. And obviously the gigantic genome splicing sheets probably won't open in 1-2-3 because of the sheet sizes. In the interests of transparency, I ought to admit that I formerly worked on Excel on the core calc team, so I may be biased... – Chris Rae – 2018-02-25T17:51:48.907

1

So the user asked for HOW to share memory over the network. Not if it is a good idea. So here is actually how you could do it.

I'm not saying this is a good idea, or will be performant, but it should work.

  • Computer 1 = "master" - where code is executed
  • Computer 2 = "child" - memory donator

I'm assuming this isn't Windows Server where you could create an iSCSI mount point.

Computer 1 Steps:

  1. Download Dataram's free ramdisk: http://memory.dataram.com/products-and-services/software/ramdisk
  2. Create a ramdisk and format it with NTFS - instructions are available on their site
  3. Within Disk Manager, create a VHD file on the ramdisk formatted with NTFS
  4. Share the Ramdisk root directory across the network with SMB - Right click the drive, share, share this folder

Computer 2 steps:

  1. Map the shared drive from the cild onto a Drive
  2. Mount the VHD you created in step 3 above in Disk manager
  3. Move the local page file location to the mounted VHD via Move Windows Page File
  4. Remove any other page file entries.

Done!

Caveats - you may be able to skip the VHD nonsense if Windows lets you move the page file to the network share. There's not many examples of this online (for obvious reasons).

Complete system instability may occur, or something else entirely. Nobody really knows what would happen.

Brennen Smith

Posted 2018-02-22T10:59:46.020

Reputation: 111

0

As you mention "RAM" for sharing over network not just "memory" of any kind, the final answer will be theoretically yes, practically no.

While other types of memory like storage and other temporary data is regularly shared over the network for various purposes and reasons. In the same way RAM can be technically possible to shared over network if needed. But the performance and cost will be too high to feasible in the real world.

The RAM or random access memory is used by an operating system as working space so lots of read / write operations are performed on it. On average system, data speed capacity with RAM is highest compared to other parts. If you put RAM on a network, you need to have very high speed data transfer capacity and cost will be sky high even if possible to achieve technically. With a tiny part of cost for a network speed upgrade you will get RAM for your machine locally.

A. Bauani

Posted 2018-02-22T10:59:46.020

Reputation: 59

0

Applications typically run in virtual memory, so their virtual memory requirement can exceed the available physical memory of the system with no consequence other than performance. The operating system will simply page virtual memory out to disk to free up physical memory as needed in any given moment for active use. This usually works just fine for applications which have reasonable locality (activity at any given time is somewhat focused to limited areas in the application's virtual memory space). If an application has poor locality (constantly referencing memory all over its virtual space), it will perform poorly unless all of its virtual memory can be accommodated in physical memory (all its virtual memory is resident).

So, there are a few possibilities here:

  • If the application simply has a large footprint but good locality, you should be able to run it on the computer you have available; performance may be acceptable, may or may not noticeably improve on a computer having more memory.
  • If it has poor locality, you may find that it will run on the available computer anyway, just very poorly. (This seems to be the case for you)
  • Upgrade the (assumed) magnetic disk drive to a solid state drive (they are significantly faster)
  • Add memory to the computer you have available (if possible)
  • You may need to find a computer which has more memory and run it on that.
  • Improve the application so that it either has a smaller virtual footprint or better locality (if you are or are in association with the author of the application).

The idea of using memory on a remote computer is basically creating a networked paging file. In theory, it can work, but in practice, performance will be far better if the paging file was local to the computer (its own hard drive) because of network bandwidth and latency. It doesn't matter if the remote system is hosting the paging file in its memory or on its disk, the bottleneck (most significant limiter of performance) will be the network. This will be especially true over the internet, but will also be true even if the remote computer is adjacent on the same LAN.

Zenilogix

Posted 2018-02-22T10:59:46.020

Reputation: 573

Windows will not allow a pagefile on a network drive, so even if it would be fast enough, it just can 't be done. – Jamie Hanrahan – 2018-02-25T02:04:13.340

@JamieHanrahan Apparently, you can if you change the setting directly in registry. I wonder if they excluded some details though since network drives are per-user in Windows. I also suspect this will break after a reboot.

– ivan_pozdeev – 2018-02-25T08:12:51.763

1Nevertheless it's a terrible idea, which is why the UI precludes it. Network connections are not reliable enough to trust for paging. Remember that much kernel data (paged pool) can be paged. If it's not accessible, even for a very short time, the OS will crash. – Jamie Hanrahan – 2018-02-28T12:20:27.887

0

This really depends on what type of application it is and for what the ram is used.

For example many web applications can use RAM over the network by connecting to a memcached server. This will allow to store cache data (and other data which should be fast to access) on another computer with a lot of RAM.

Of course this is application specific and needs an application which can use memcached. This won't help you to open a second instance of slack as a browser does not support using such a cache backend.

allo

Posted 2018-02-22T10:59:46.020

Reputation: 731

-1

Instead of sharing the RAM, Just code that application to create a child .exe file, that will be run on the Network PC and do the same on that pc.

T.Todua

Posted 2018-02-22T10:59:46.020

Reputation: 2 436