OpenWRT and USB write cycle limit

3

1

Background (feel free to skip)

I am currently usin OpenWRT at home. I have an external HDD connected to router's USB port for the network shared storage. Actual transfer speed from the HDD to the workstations over the lan is very much acceptable.

Recently I have been installing some additional software and I ran out of space on the router. I have solved that problem by moving the /overlay to the external hdd. I have also created a swap file within the /overlay. The functionality is working great.

The HDD I am using spins down the disks when not accessed for some period of time. And now that /overlay has been moved to the hdd, the performance of some applications is affected. For example when trying to access web server or transmission web interface after a period of inactivity I experience the delays. If I stand close enough to the router I can clearly hear it speeding up while the application I have called is waiting.

I am planning on keeping all my storage (photos, documents, music, videos, etc) on the external drive, but moving the /overlay and swap file to the USB stick connected to the second USB port of the router. I believe this will improve the access speed significantly.

Actual questions

What are the implications of using the USB stick for /overlay and in particular for having a swap file on the USB stick?

Is there a risk of OpenWRT exceeding the write cycle limit of the USB stick?

Does anyone have experience with placing OpenWRT swap on USB and using it over a significant period if time?

Any comments/advice appreciated.

Art Gertner

Posted 2015-04-17T11:01:21.707

Reputation: 6 417

1This sounds like a better question for the OpenWRT community honestly. Most flash memory has millions and millions of writes per memory cell. The chances of you reaching those limits even if you wrote data continuously for years is unlikely since your only talking about a very small amount of data on a very large flash drive. Most flash drives have less then 2GB of memory, you have to look really hard, to find drives that small. – Ramhound – 2015-04-17T12:46:18.570

Do you have some news about this? I'd like to put a database server on a pendrive for logging sensor data in every sec, which is write intensive as well... – inf3rno – 2015-08-14T03:47:05.770

I am running OpenWRT barrier breaker on USB drive since april 17. No problems so far. – Art Gertner – 2015-08-14T08:32:26.170

1The flash drive eventually died after about 2 years. I replaced it with a brand new one – Art Gertner – 2017-09-13T08:04:45.480

@ArtGertner Thank for sharing your experience. I am using my pen drive for about 3-4 months to store log data etc. Do you have any idea about the maximum storage OpenWRT can support? I have a 2TB hard disk. – Sourav Ghosh – 2018-10-27T07:03:03.170

I don't know of any restrictions on USB storage size imposed by OpenWRT. I think standard filesystem restrictions will apply for each volume... with 2TB you are very far from reaching these limits. I have successfully mounted and used 1TB USB hard drive before. – Art Gertner – 2018-10-27T20:27:37.767

No answers