Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Additional RAM from USB?

Thu Sep 01, 2011 3:52 am

Quote from ShiftPlusOne on August 30, 2011, 15:38
duct tape

It's sort of like the force...there's a dark side and a light side and it holds everything in the universe together... :D

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

Re: Additional RAM from USB?

Thu Sep 01, 2011 4:15 am

Longevity: (wikipedia)
Barring physical destruction of the drive, the memory or USB connector of a flash drive will eventually fail. SLC based memory is good for around 100,000 writes; more commonly used MLC for around 10,000. The USB connector can withstand approximately 1,500 connect/disconnect cycles.[23]

Which does your USB stick have, I bet it is MLC it has a higher progit margin. SD's have both types SLC and MLC so it is going to matter which you have and how hard you use it. SLC is in the range of 100k to1Mil Program/Erase cycles on SD cards, depends on manufacturer.

As I said in another thread; remove half of your memory then replace that memory with a Flash drive that equals the memory you removed then try it out.Set your swap file to the flash drive only. us it exactly as you use it now. You will see slower performance at least. Maybe even a Flash failure.

Again it all depends on how you use it. Are you swapping at the full 25Mbps the card can handle (unlikely as most cards can not reach their rated max) rather than the 10 Mbps you calculated. And if the P/E cycles is 10k not 300K. It is a game of what ifs at this point. I suspect you are right that a SD card or a Flash stick "might" last years if it only swaps occasionally and you use the RasPi within its limitations. But to use it as "Additional RAM from USB", which is the heading of this thread, Not likely. Use a USB HDD instead. It will prove to be much more robust and it will add additional storage above and beyond any USB flash drive. If all you have is a Flash drive on hand then use it. I would if I did not have two USB HDD's lying around right now. but I would not depend on USB flash for years of trouble free service as you seem to be willing to do.
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!

jacoman
Posts: 24
Joined: Thu Sep 01, 2011 6:52 am

Re: Additional RAM from USB?

Thu Sep 01, 2011 7:59 am

Good Idea Maybe raspberry pi could sell ram usb sticks.

Archangel5089
Posts: 36
Joined: Mon Aug 15, 2011 8:37 am

Re: Additional RAM from USB?

Thu Sep 01, 2011 8:48 am

Quote from Lob0426 on September 1, 2011, 05:15
As I said in another thread; remove half of your memory then replace that memory with a Flash drive that equals the memory you removed then try it out.Set your swap file to the flash drive only. us it exactly as you use it now. You will see slower performance at least. Maybe even a Flash failure.


Good think is that it's a cheap enough experiment to have two of these running side by side if you really want to satisfy your curiosity... :)

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

Re: Additional RAM from USB?

Thu Sep 01, 2011 11:12 am

I've been working in IT for 15 years. I've seen RAM sticks turn bad, CPUs turn bad, HDs, Almost all the name-brand CDs I burned 10yrs ago have turned bad... basically, everything turns bad (and we die, too).
I've never seen a flash stick nor SSD turn bad though ^^ It's only a matter of time I'm sure.

My point is: I know it's fashionable to get a bit hysterical and alarmist about flash having a built-in end-of-life. In the real, practical, world, it doesn't matter. It's very durable still. And it's cheap as dust. And everything else dies too at some point, anyway. Go visit the Plug Computer forums: these guys are doing pretty much what we want to do with Raspis, and have been doing it for years. With Flash. No particular problem (a handful of cards died, but not a whole lot, it's a trivial issue to them compared to their PSUs ^^).

There are a handful of best practices when mounting flash in linux:
- turn off journalling,
- turn off date/time access logging
- use ext2 instead of 3 or 4 (not quite sure, I think it's 2, it's definitely not 4)
- make sure your partitions are aligned with flash cells...
If we want to get all worked up about the subject, let's work on those points.

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

Re: Additional RAM from USB?

Thu Sep 01, 2011 3:30 pm

I on the other hand have seen plenty of USB sticks bite the dust. In state service the only type of removable media that was allowed was Flash sticks(now not even those mostly).

I think it is BAD IDEA[1] to support the idea of USB as "RAM" here's why. The foundation is going to have to provide at least some technical support for the RasPi. Among the users they are going to have to deal with is the person who after a long call, because their RasPi is not working, finally gets to the point that they find out the power has went out in the whole town. The person that plugged a 5v power supply into it even though it is clearly documented at 6v to 20v because they read all the threads that talked about USB and 5v. And this thread could be one of those headaches.

So I will quit arguing with you, I do know it will work, I have already done it myself. But please think about the foundation and the headaches that some of these threads can cause for them at technical support. I would rather have them working on new RasPii than on the phone with someone who took this thread too literally. The person that can not get Ubuntu to boot into the "Unity" interface even though he made sure he used the whole 8GB stick as virtual memory, and he does not understand why it takes 20 minutes to boot.

[1] BAD IDEA. Sic,
Standing in the middle of the highway mooning oncoming traffic. A BAD IDEA.

Trying to slow your rate of descent, by flapping your arms, after you were dumb enough to jump in the first place. A BAD IDEA.

Bringing your fists to a gunfight, though it works for Steven Seagal, Is a BAD IDEA.

And finally: telling the Officer issuing you a ticket for speeding that you could buy three axx holes just like him. A BAD IDEA!
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”