8

I have two systems. One is a laptop and has 2 GB RAM while the other is a desktop having 8 GB RAM. Is it possible to share these resources so that both systems have 10 GB RAM?

The software I want to run on both systems is Android Studio... which currently the laptop is not handling quite well.

Additional information: Both systems are running Windows 8 and have Intel Core i3 processors.

thanks ppl, but i got another question.. how about sharing it through an ethernet cable?? as in via a switch or v-lan , therby not using the internet at all and but getting a descent transfer rate???

  • 2
    No, ram is not transferable. – Ctrl-alt-dlt May 22 '15 at 7:59
  • 15
    Sure you could do that. But the shared RAM would only be as fast as your network speed. In other words, this is possible (well, theoretically anyway), but not practical. – Ajedi32 May 22 '15 at 16:11
  • 4
    It's not reasonable to ask you to switch operating systems, but do know that Linux has virtual memory compression meaning that you can use more RAM than you physically have by compressing certain segments of it with LZO. – Naftuli Kay May 22 '15 at 18:57
  • 5
    If you were using Linux, you could rig up something using a ramdisk, a network block device, and a swapfile. I don't believe Windows has this sort of capability. – Mark May 22 '15 at 20:07
  • 4
    You're asking the wrong question. The question you should ask is, how do you leverage the more powerful machine to perform builds? And one possible answer is the Gradle SSH plugin. – Michael Hampton May 23 '15 at 3:23
21

Only some programs allow to split processes over the network (some 3D rendering programs, effectively sharing RAM) (See answer of Julian Knight)

The problem with internet would be that's too slow (See answer of Spiff)

I think the RAM of your desktop won't be hardware compatible, so just placing the RAM strips into your laptop won't work.

What you can do:

Install a remote desktop client on your laptop and connect to your desktop. This way you can "work on your desktop" through the tunnel.

So the heavy program (android studio) will run on your desktop! And the laptop would only be bothered by the remote desktop client.

This, effectively uses the PC hardware and would thus work better (if your laptop and remote desktop client are sufficient and easy enough to work with.

I'd like to add that this does not "share" RAM, but just uses the RAM of the pc, which is sufficient.

  • 1
    I think that there are programs that allow you to drag a window from one operating system to another, but I'm not sure of the name, if the processing is still done locally or anything else. – Ismael Miguel May 22 '15 at 14:42
  • 1
    Parallels, but that's virtualization. – Arthur Kay May 22 '15 at 16:41
  • 1
    @Alvin A remote desktop application wouldn't go through the Internet unless you specifically set up your network for that. If you connect to your desktop using its IP on the network the connection will exist only on your network. – Logarr May 23 '15 at 18:06
9

Probably not, as it would be pretty slow compared to doing virtual memory paging to a local drive. SATA-3 is 6 gigabits per second, and I have a two-year-old 4TB 7200 RPM SATA-3 HDD with a sustained 157 MebiByte/sec (~1.3 gigabit/sec) read/write rate. Sustained transfer rates over gigabit Ethernet are around 0.942 gigabits/sec at best.

  • 4
    Note that for some workloads, random access latency is more important than bandwidth (and I suspect your disk bandwidth figure was for large accesses not random 4KiB chunks). Even with networking overheads, transferring 4KiB directly from one system to another would probably be faster than average disk access (with seek, settle, and rotational delays). Before SSDs became popular, there was research on using other systems' RAM for swap space. FuaZe's answer of moving work to the larger system seems more practical. – Paul A. Clayton May 22 '15 at 11:17
  • 3
    Right, but your drive has a MUCH, MUCH lower random access speed than gigabit ethernet. For that you'd need solid state. – Arthur Kay May 22 '15 at 16:40
  • @Spiff thanks ppl, but i got another question.. how about sharing it through an ethernet cable?? as in via a switch or v-lan , therby not using the internet at all and but getting a descent transfer rate??? – Alvin May 23 '15 at 16:12
  • @ArthurKay : Or a professional class 30Krpm drive which is used in load-balancing virtualization clusters. – user2284570 May 23 '15 at 20:17
  • @Alvin That's exactly what this answer is talking about. "...transfer rates over gigabit Ethernet..." – BenjiWiebe May 23 '15 at 23:36
1

No, this is not possible.

The only slight exception is where you are using a tool that is capable of splitting processing across multiple machines such as 3d graphics rendering. However, this is not really what you are asking.

  • Do you know inferno? Since he is using x86, networked DMA access can be a real help. – user2284570 May 23 '15 at 20:30
  • The OP specified Windows 8 so that doesn't help him I'm afraid. – Julian Knight May 24 '15 at 20:29
  • This was just for telling that contrary to what you said, it is possible. For the OS the system appear as a non shared memory SMP system. – user2284570 May 24 '15 at 22:16
1

About seven years ago the memory controller was moved from a separate chip (northbridge or memory controller hub) to the CPU. Do you know why? To decrease latency, because the CPU needs very, very high speed access to RAM. Current CPUs access RAM with 68 GB/s : http://ark.intel.com/products/82930/Intel-Core-i7-5960X-Processor-Extreme-Edition-20M-Cache-up-to-3_50-GHz. Modern 1 Gbit/s Ethernet gives you about 120 MB per second, hence 560 times slower. So, it is not something you can do on regular PCs.

There are cluster computing-based solutions with many computers connected to a network and each stores some part of data in its RAM. It is much slower than regular RAM, but you do not have a choice if your need 10 TB of data to be available. But such solutions should be supported by software. And Android Studio does not support it.

So, the answer is no, unfortunately.

  • 1
    For using virtualization fault resilient clusters, I can say sharing RAM over cat5E Ethernet to even slower drives works fine with modern OS and programs. – user2284570 May 23 '15 at 20:20
1

It's not currently possible, but this was actually listed on the cards in some form and pencilled in for "After Vista" as part of the 'ReadyBoost' system which allows you to use a USB stick as a medium for reading the page file (and other files) quicker than using the disk. It's not extra RAM as such, but if you're using a lot of RAM it can reduce the amount of time your computer spends paging stuff to and from the disk.

It sounds like in your scenario you'd benefit from a 32 GB USB stick dedicated to ReadyBoost.

  • This does not appear to answer the OP's question. While it may have been the plan originally for ReadyBoost to allow sharing RAM across the network, it's not how it is currently implemented. – ChrisInEdmonton May 22 '15 at 15:07
  • @ChrisInEdmonton OK, I've edited my answer to specifically state that it's not possible but was planned at one point rather than only stating it was planned. – Matthew Steeples May 22 '15 at 17:57
  • 2
    And ReadyBoost is too bloody slow to be useful. Computers actually slow down when using ReadyBOOST. Not much of a boost at all. – Tonny May 23 '15 at 13:03
  • 1
    @Tonny Think it's one of those "your mileage may vary" scenarios. I've personally found that it sped up slower computers, and made little difference with fast computers. Never experienced it slow down a computer. Obviously there's no substitute for a ton of RAM and SSD disks, but if you can't / won't go for that and have uncrowded USB buses going spare then it might help – Matthew Steeples May 23 '15 at 16:39
0

This is not possible, at least not without a huge effort on Google's part.

Basically, Android Studio would have to support multi-node distributed processing much like BitCoin mining and Folding@Home.

Upon pressing compile on your laptop, it will send a chunk of code to your desktop for processing. Once the desktop is finished processing then it will send it back to your laptop so that it can patch things together.

  • I doubt compilation is what burns memory in Android Studio. – Atsby May 23 '15 at 7:17
0

I have an office; a room with a personal assistant and a cabinet storing 5000 books and a work desk with space for 20 books. Picture this configuration as

  • Office = computer
  • Me = processor (CPU)
  • Assistant = operating system (OS)
  • Desk = RAM
  • Cabinet = Hard disk

At any one time 20 books, at most, can be taken out of the cabinet by my assistant and placed on my desk for work. Due to my secretary's own work, he may place a book or two of his own on my desk (let's just say we are poor and cannot afford another desk).

If I want to work on other books, there is no more space, and my assistant has to determine which current book(s) on the desk I am least likely to use at the moment, and will slot that book back into the cabinet to make way for the other books I want. The assistant has to walk to and fro the desk and cabinet every time I wish to work on a book not within my reach.

For a system with insufficient RAM, that is what the OS does for processes that does not appear to be very active - take their memory contents and write them to disk in a virtual memory store, freeing up RAM for other processes that need it. Just like there is distance between desk and cabinet, there is "distance" between processor, RAM, and disk. The disk is incredibly far, and slow, just as you experience with your laptop.

In the next office, my colleague has a desk spacious enough for 80 books. Wouldn't it be nice if the he could "share" some of his desk to store my books? So that I could virtually have 100 books?

Well, first of all, the assistants in each office inevitably need to place some of their own books so they can perform their own work (not negotiable). All OS in a system need to use some RAM to do their work otherwise you'd have no OS to begin with. So I don't really get the full 20 book allocation, nor my colleague with a full 80 book allocation. And my colleague has his own work to do which further depletes the the available space.

Furthermore, the assistants are not trained to move books between offices (take it that their competency levels have a limit). Existing Windows architecture does not have provision to directly use the RAM of another remote computer.

Now, imagine if the assistants were indeed trained to properly move books between offices and clearly remember the ownership of books, walking between offices is very likely going to be an even slower procedure because walking out of one office to another is of a greater distance. Not only that, when the assistant fetches the books from the other office, he would still have to clear space on your own desk, by shuffling unwanted books back into the cabinet. Why make him walk so much?

Exiting one computer to store/retrieve stuff in another computer via the network, at least for your use case, is not achievable because the app nor the OS does not know how to accomplish it. And it wouldn't be very efficient either.

If you want to continue working with the laptop, install more RAM (bigger desk), or install a solid-state disk (cabinet with organisation features that make locating books faster).

Note that in some configurations it can actually be faster to store and retrieve data from remote computers - there are clustering software technologies that do just that - then to access slow spinning disks, but those are still not catering to your scenario.

Consider the time scales of data access between hardware resources.

  • 6
    I think you're interpreting the question too literally. Obviously, it's impossible for the computers to have 10GB each but it is, in principle, possible for the computers to share 10GB so that, for example, they could use 5GB each instead of the laptop being limited to 2GB. Performance would be terrible but it's possible in principle. – David Richerby May 22 '15 at 9:08
  • @DavidRicherby - Questions should be read literally. The written word is a wonderful thing, the only thing it means, is exactly what you say. So the author is literally asking if they can combined two independent computer's system memory to increase performance which of course isn't possible. – Ramhound May 22 '15 at 11:05
  • 5
    @Ramhound You seem to have misunderstood this answer. This answer says that it's impossible to combine a 2GB system and an 8GB system to get two systems each with 10GB (because that would be a total of 20GB, which doesn't exist). Interpreted overly literally, that is what the question asks. You're talking about combining 2GB+8GB to get two systems sharing 10GB, which is what the question is intended to ask about. So you've rather shot yourself in the foot with your claim that questions should be read literally: the literal question is nonsense; the intended question at least makes sense. – David Richerby May 22 '15 at 11:29
  • @DavidRicherby - If you say so. I found the answer helpful. Since it correctly pointed out you cannot combine system memory from two independent computer systems just like you cannot combine two gas tanks from two seperate and independent automobiles. Of course, I am not sure he comes up with 220, that indeed does not make sense. – Ramhound May 22 '15 at 11:53
  • This question and answer is perfect example of GIGO :) – Ratna May 23 '15 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.