Is it possible to create virtual disk out of CPU cache?

0

1

I heard a story from 1 bro, that some other bro installed small OS on CPU cache and it worked very fast. Intel® Xeon® Processor E7-8870 v3 has model with 45MB cache. Are there some technologies that allow to use process cache as disk? Did such technologies exist in the past?

Link

Posted 2016-05-04T09:13:45.293

Reputation: 27

6Cool story bro. – qasdfdsaq – 2016-05-04T11:04:12.727

I suppose it could be true. But if true, I doubt it was an OS that could use the advanced features for reasons stated by @ClassStacker. I know I wouldn't be the one loading things onto the cache of $7000 cpu. – Paulb – 2016-05-04T12:11:05.997

Your quesiton is way to broad bro. Unless you can link to the story it will be hard to actually answer this question. Its likely your bro,full of you know what, bro. – Ramhound – 2016-05-04T12:36:48.047

This will be more interesting as laboratory experiment or for overcklockers than for using in production. – Link – 2016-05-04T12:43:07.470

The cache is volatile memory, by the way. – Daniel B – 2016-05-04T12:57:34.693

List of Linux distributions that run from RAM https://en.wikipedia.org/wiki/List_of_Linux_distributions_that_run_from_RAM

– Link – 2016-05-04T13:07:12.603

Answers

1

CPU cache is usually dynamically mapped to physical RAM address space on demand. There are indeed platforms (combination of CPU and operating system) which allow to lock a certain association between RAM and cache. Also, there are CPUs which have dedicated fast internal memory, but that's for embedded systems, not for servers.

The E7-8870v3 has 18 cores and if one would lock significant amounts of its 45MB level 3 cache then performance would probably degrade as compared to automatic cache allocation, except if all 18 cores need to do a certain task very quickly and repeatedly and/or all the code and data fits into the level 3 cache.

=> The term install makes no sense in this context because either everything fits into the cache anyway, then it's a complete waste of efforts to try and lock anything into the cache because that will happen automatically, or it doesn't fit into the cache and then it's obviously impossible to "install" it.

Using a CPU cache as a disk is of course (effectively) possible if you simply use a RAM file system. If there is CPU cache available and the RAM file system is accessed extremely often, then chances are that at least parts of the RAM filesystem may automatically reside in the CPU cache. This is equivalent to what you're asking for.

However, once more, this CPU has 18 cores, so under usual circumstances (usual operating system and applications), this will not happen and also it won't make sense, because the per-core level 2 cache is rather small and the CPU will only perform well if it can use a significant amount of its L3 cache as it desires.

Run CMD

Posted 2016-05-04T09:13:45.293

Reputation: 508

The term install has no sense. What I mean is using part of CPU cache as file system to boot from it and another part as RAM for that Operating System. http://unix.stackexchange.com/questions/191296/is-there-a-linux-os-that-can-be-loaded-entirely-into-ram

– Link – 2016-05-04T12:36:44.983