The Ferminator
Posts: 8
Joined: Tue Aug 02, 2011 7:31 pm

Re: Memory expandability?

Wed Aug 10, 2011 7:15 pm

Would it be possible to provide an expansion slot/socket for RAM? You could sell memory expansion cards or make them an open design so people with the know how can make their own cards.

Depending on the slot type chosen this should have a small footprint and low cost to add.

If this is possible, how much RAM would the other hardware and the software support?

User avatar
Gert van Loo
Posts: 2487
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Memory expandability?

Wed Aug 10, 2011 7:30 pm

No, the DRAM interface is no longer accessible after you put a PoP on it.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Memory expandability?

Wed Aug 10, 2011 10:21 pm

The only way to get more memory is to buy an upgraded device. As they produce more they will hopefully be able to buy memory modules at a more competitive price point. An option is to use virtual memory if your project has a Hard Disk Drive attached through the USB. Not a perfect solution as these drives are slow.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Memory expandability?

Wed Aug 10, 2011 10:25 pm

what about virtual memory via an attached SD card?
Dear forum: Play nice ;-)

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6234
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Memory expandability?

Wed Aug 10, 2011 10:29 pm

Quote from abishur on August 10, 2011, 23:25
what about virtual memory via an attached SD card?
That would be swap then, wouldn't it?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26868
Joined: Sat Jul 30, 2011 7:41 pm

Re: Memory expandability?

Wed Aug 10, 2011 10:41 pm

Quote from Lob0426 on August 10, 2011, 23:21
The only way to get more memory is to buy an upgraded device. As they produce more they will hopefully be able to buy memory modules at a more competitive price point. An option is to use virtual memory if your project has a Hard Disk Drive attached through the USB. Not a perfect solution as these drives are slow.


PoP packages have the memory inside the package sitting on top of the SoC- they combine to make one device. You need to sell a LOT of these before it becomes cost effective to make a design change - e.g. more memory. With the best will in the world, Raspi probably won't sell that many so it's other buyers of the chip that dictate the memory size. For those other buyers, cost is VERY important - when you buy millions, $5 more on memory you might not need is a lot of cash off the bottom line for no benefit - they haggle down to the cent level.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Memory expandability?

Wed Aug 10, 2011 11:15 pm

jamesh: it is complicated dealing with the market isn't it?

abishur: virtual memory usually requires a huge number of "writes" to the drive. Any type of flash based memory has a limited number of write cycles before failure. These vary with the quality and type of flash and the drive balancing firmware. SSD drives can be a million plus writes, but SD cards are usually a significantly lower number of writes to failure. As an example windows can destroy an SSD in a few hours. This is why it is recommended to turn off virtual memory when using a SSD or point the virtual file to an HDD. A SD card does not have a limit on "reads" technologies like readyboost are aware of this and store files for quick acces but write to the card infrequently. It would be nice if a caching software could be ported to the RasPi. Since the RasPi uses flash to store it's operating system a SD card based cache would not provide any real benefit there. The cache would be as fast as the device it was caching, if it wasn't you would be smart to use the faster card for the OS. A flash cache would help as a performance device in between an USB HDD and the RasPi, but add cost. A pretty little circular argument huh?
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6234
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Memory expandability?

Wed Aug 10, 2011 11:22 pm

Quote from Lob0426 on August 11, 2011, 00:15
As an example windows can destroy an SSD in a few hours.

What?

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Memory expandability?

Thu Aug 11, 2011 12:45 am

The Windows virtual memory system constantly writes data to the "virtual memory" file. It is a dynamic file rather than a cache. It swaps (writes) data to the drive until it is needed. Then it reads it back. then writes again as the data is changed. This involves a huge number of write operations. As explained above this type of use is not suited for SSD's. The windows virtual memory file literally wears out the drive in short order. It keeps writing until the flash memory can no longer except a write.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6234
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Memory expandability?

Thu Aug 11, 2011 12:55 am

Surely you're talking about micro/miniSD cards only and not SSD's in general (like an M4 for example)?

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Memory expandability?

Thu Aug 11, 2011 2:41 am

Sandisk states the writes per sector endurance of it 2GB card at 100,000 writes. I will have to eat some crow on the endurance of the new SSD drives though! Intel claims its X25-E SSD (SLC) at 1 Petabyte writes or 58 days of 17 TB random writes. I doubt any of us will ever reach that under several years even with a virtual file enabled. Of course you should remember that "Intel" drive is an Enterprise level SSD. The one we can afford probably will not be as robust, but will certainly live longer, with a virtual file enabled, than several hours. Things do change over a year or so. SLC memory lasts 10 times as long as MLC so you should take that into account if you propose to run virtual memory enabled. So if you can afford a SSD you could very well use it as virtual memory, but a HDD is going to be cheaper. and considering the performance level of the USB interface an SSD is way overkill. As to a SD Card it will last a while but will die in the end and not to far in the future.

copied from wikipedia:
Memory wear Another limitation is that flash memory has a finite number of program-erase cycles (typically written as P/E cycles). Most commercially available flash products are guaranteed to withstand around 100,000 P/E cycles, before the wear begins to deteriorate the integrity of the storage.[8] Micron Technology and Sun Microsystems announced an SLC flash memory chip rated for 1,000,000 P/E cycles on December 17, 2008.[9]

The guaranteed cycle count may apply only to block zero (as is the case with TSOP NAND devices), or to all blocks (as in NOR). This effect is partially offset in some chip firmware or file system drivers by counting the writes and dynamically remapping blocks in order to spread write operations between sectors; this technique is called wear leveling. Another approach is to perform write verification and remapping to spare sectors in case of write failure, a technique called Bad Block Management (BBM). For portable consumer devices, these wearout management techniques typically extend the life of the flash memory beyond the life of the device itself, and some data loss may be acceptable in these applications. For high reliability data storage, however, it is not advisable to use flash memory that would have to go through a large number of programming cycles. This limitation is meaningless for 'read-only' applications such as thin clients and routers, which are only programmed once or at most a few times during their lifetimes.

hopefully that will clarify the life of flash memory. But I still had to eat some crow!
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6234
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Memory expandability?

Thu Aug 11, 2011 3:26 am

Ah, you had me worries there for a while. I have windows running of an SSD. Good to have some more info on it.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Memory expandability?

Thu Aug 11, 2011 3:37 am

I would still protect that investment in an SSD by moving your virtual memory over to a HDD if you have one in there. It is under advanced system performance settings.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6234
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Memory expandability?

Thu Aug 11, 2011 3:52 am

Yeah, that was the first thing I did after installing windows. =)

Cafe
Posts: 62
Joined: Thu Jul 28, 2011 2:22 am

Re: Memory expandability?

Thu Aug 11, 2011 6:53 am

We're probably drifting away from the Raspi here, but I wonder if it is worth getting a hybrid HDD (such as the Seagate Momentous) for virtual memory.

Michael
Posts: 340
Joined: Sat Jul 30, 2011 6:05 pm

Re: Memory expandability?

Thu Aug 11, 2011 7:28 am

I've been running pfsense on an ALIX system for a few years and m0n0wall on a Soekris system for longer. Both use compact flash and thrash the fs with cache files but neither have failed yet.

Beagleboard and Gumstik use a similar PoP configuration but one that uses flash in the PoP. I haven't heard of anyone killing the flash in these devices (beagleboard celebrated its 3rd birthday recently).

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4249
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: Memory expandability?

Thu Aug 11, 2011 1:42 pm

i've never actually killed an sd card yet but i do a lot of development on another device that uses them (lots of 1 to 1000 byte writes, maybe 1000 to 5000 per day) and after about 2 weeks per sd card i've normally worn it down to be just cellphone fodder and completly useless for the device. as it has become too slow for booting the device so that might be a consideration for those who will do a lot of development ON the R-Pi rather than on a pc and then loading it onto the R-Pi

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Memory expandability?

Thu Aug 11, 2011 5:48 pm

It is not the number of reads that do them in, only the writes or P/E (program/erase) cycles. The number of reads is next to unlimited. Wear leveling will provide some protection to the card. The obverse is that SD cards are cheap. The flash mounted in a top package probably is only written to during updates, also it is probably higher end flash. There is flash in every router and they usually get replaced before they fail as we continue upgrade to newer equipment. Most people never update their firmware or change settings. 100,000 writes of 1GB to a 8GB card that is distributing the wear across the card is going to take a while fail. 8GB of 8GB to the same card will kill it in a lot less time. Cacheing files that are only read will have little effect even if they have to be changed daily. Establishing a dynamic virtual file that is constantly writing is a BAD IDEA with flash memory.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

The Ferminator
Posts: 8
Joined: Tue Aug 02, 2011 7:31 pm

Re: Memory expandability?

Thu Aug 11, 2011 8:30 pm

OK back to why it wont work. If you are saying that after you put a RAM IC on the board it can't be changed? I was thinking that there could be a socket on the board that the memory fit into so it could be easily changed out for a larger capacity chip.

I had thought of swap(Linux virtual memory), but it is usually slower than actual RAM even if it is on flash/solid state memory. Adding a HDD via USB for virtual memory completely defeats the purpose of the R.Pi in my opinion because it would take up more space and cost more. Having a user upgradable memory system is much more convenient.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: Memory expandability?

Thu Aug 11, 2011 8:51 pm

I don't suppose they make an adapter that takes an SD port and turns it into an eSata port
Dear forum: Play nice ;-)

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Memory expandability?

Thu Aug 11, 2011 10:45 pm

The memory module is placed on top of the central processing unit. It is thermally bonded ( essentially soldered) to the CPU. Basically having a user replaceable memory system is an x86 thing. In "embedded" computing the devices are purpose built. The only way that I can see this would be changed would be to install, during manufacture, a larger memory top package There is no memory bus that can be accessed externally. It is on the CPU. They may be able to install an external bus connector to a cacheing device, it would probably be USB with the current chipset. There are some really small hard drives that would work. Look up IBM microdrive. I don't think IBM actually builds them anymore but that will get you there. I think you will be surprised at what small drives can be supported through adapters to USB. Though virtual memory is slow it is still faster than when you run out of memory!

No abishur I have never seen such a thing. Help me talk them into a Type 2 CF card reader and we will be in a different realm then. lol

In reality the PoP top package memory makes a lot of sense. It is very close to the processor, the memory controller hub has to be built into the processor (just like every Intel processor made after the i7-920), and it doesn't use up any valuable real-estate.

What is the maximum package size for this CPU (actually GPU)?
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Memory expandability?

Thu Aug 11, 2011 11:09 pm

Sorry cafe I didn't answer your question, so here we go. A hybrid drive such as the seagate uses a flash memory cash to speed access to the system requests. If the file that is asked for is in flash it can fulfill the request very quickly. If it is not in flash it has to be called from the hard disk. As you use it it will attempt to keep the most used items in flash. The operating system helps in this task to some extent. (Now this is where I expect to get kicked around) Since your operating system and most, if not all, of your programs will probably fit on the SD card, I do not expect a hybrid drive to be much use. Additionally you will be accessing it through a major performance bottleneck, USB! (let the bashing begin lol). I believe these hybrid drives do not allow a virtual file to reside in flash, somebody correct this if I am wrong. Of course the cure would be to have a SATA interface but again the cost would go way up. How many of us would still be interested in a $100+ dollar RasPi? I don't see many of running to Beagle Boards.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

Lerc
Posts: 14
Joined: Sun Jul 31, 2011 6:04 am

Re: Memory expandability?

Wed Aug 31, 2011 8:22 pm

I have two points to make here.

#1 It is provably false that you can wear out a Flash Drive or SD in a few hours by swapping. It's quite a cheap experiment. Buy some flash, set it to swap, start it thrashing and leave it going for a number of hours that you would consider more than few.

#2 Wear levelling greatly increases the number of writes available to a system. Perfect wear levelling would result in you having to write the entire device capacity multiplied by the number of write cycles. For Thumb Drives and SD they typically only do wear levelling on the dynamic data, Something written doesn't move, but something that gets rewritten does. Swap is just about the ideal form of dynamism required to maximize the wear levelling effect. With even moderate wear levelling the amount of effective writing you get means that rewriting at maximum device speed takes years to reach the wear out level.

Long story short. I run swap on SD. They go obsolete before they wear out.

obarthelemy
Posts: 1407
Joined: Tue Aug 09, 2011 10:53 pm

Re: Memory expandability?

Wed Aug 31, 2011 9:26 pm

A French site has been running burn-in tests on SSDs, writing to them non-stop at max speed. Conclusion: none yet, the SSDs have .. failed to fail... after what amounts to several years of typical use. My take on it is we can probably disregard wear as an issue.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Memory expandability?

Wed Aug 31, 2011 10:10 pm

Lerc: remove half of the memory you have now, replace it with the corresponding replacement of flash as a virtual file not a cache and let me know how it turns out, after you use it how you usually do. RasPi if properly setup even with only 128MB of RAM should not be dependent on a virtual file. If it is there will eventually be issues. Some where after the P/E cycle claimed by that manufacturer. Wikipedia has some very good info if you are interested.

obarthelemy: An SSD uses a much more advanced flash memory than say an SD card. That's why they cost more per GB than a SD card or a USB stick. USB sticks tend to have the cheapest memory chips of the market and therefore the highest profit margin. Find a test where they have been burning in SD cards. When SSD's first came on the market they were failing regularly because people had forgot to turn off the Windows swap file. Is that still so maybe not. I know that if I put out the investment to buy a SSD I am not going to risk it. Your SSD your choice! I keep my PC's an average of three years. Every drive is tested under standards that the industry believes is "typical" usage.
Were you around when they found that defragging was ruining hard disks. They swore that those disks could survive it but the drives were not. The culprit was heat. A drive was taking hours to defrag even though they were only 100MB to 300MB in size. Defrag was changed and the drive manufacturers made changes to the drives, and to their test models. I never lost a drive to a defrag myself as I religiously defragged so it never took hours for my drives to finish. I know this is off the above topic. Knowing the consequences can save you heartburn later. Again make your own choices.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

Return to “General discussion”