You are not logged in.
Pages: 1
hi fellows,
I have an unused but not too old (at least compared with my hardware on signature )
and I would know if I can use it as a cache (à-la readyboost of W)
or better: first, I should know if this operation make sense, with my combination of hardware (I think through benchmark)
then I could "build" this equipment
thanks
Last edited by nTia89 (2013-08-17 11:51:37)
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
USB sticks tend to be terribly slow I/O. While the flash memory itself is certainly fast, the usb is a bottleneck. In most cases I/O to a usb flash drive will be slower than to an internal hard drive. If this is the case here, I don't see how it would be useful as a cache.
EDIT: perhaps there is some other way of using unformatted usb sticks more directly that would side-step this - so I could be wrong. I'm speaking only from experience with writing blocks of data to partitioned usb flash drives which is always *much* slower than saving it to the harddisk.
Last edited by Trilby (2013-08-16 11:47:50)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
i know that USB sticks' life time is limited to a certain no. of write opreations. using one as cache would probably condemn it to an early grave
Offline
i know that USB sticks' life time is limited to a certain no. of write opreations. using one as cache would probably condemn it to an early grave
yes, I know it
but in my case the USB is unused and will remain in that status....
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
Windows did exactly this with ReadyBoost. Looking into it would probably be worthwhile.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Like already said, USB sticks are usually very slow and would actually slow things down more than anything else unless you have a super-fast 32 GB USB3 drive.
You should test it before actually setting everything up.
Here are some samples from my computer:
max-p ~ % sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 624 MB in 3.00 seconds = 207.94 MB/sec
max-p ~ % sudo hdparm -t /dev/sdb
/dev/sdb:
Timing buffered disk reads: 344 MB in 3.00 seconds = 114.62 MB/sec
max-p ~ % sudo hdparm -t /dev/sdc
/dev/sdc:
Timing buffered disk reads: 52 MB in 3.03 seconds = 17.15 MB/sec
sda is an SSD
sdb is a 7200 RPM HDD
sdc is a 16GB USB stick.
You can use dd to write stuff to it and see how fast it went, I'm not doing it on mine because I have data on it, but it's around 3 Mb/s write speed, this is way worse than the HDD.
Unless you have a corner case where you need a lot of random-access over sequential read, it's probably not worth it at all. Your USB stick has to be at least faster than your disk if you want benefits of doing that.
From what I read, Windows uses this for random-access on small files. Linux already use RAM as a cache, so it would make more sense to me to use zram to increase the ram capacity so you can have more data on RAM for ultra-fast access instead of messing around with USB sticks.
Anway, what you want is probably bcache. Have fun.
Offline
I am not sure about this but, you can create Swap File in your usb and you can use it for suspending your system.
The short cuts are only short because they don't actually go anywhere. -- Trilby
Nothing feels better than being understood -- awayand
A pathetic dreamer
Offline
Like already said, USB sticks are usually very slow and would actually slow things down more than anything else unless you have a super-fast 32 GB USB3 drive.
You should test it before actually setting everything up.
Here are some samples from my computer:
max-p ~ % sudo hdparm -t /dev/sda /dev/sda: Timing buffered disk reads: 624 MB in 3.00 seconds = 207.94 MB/sec max-p ~ % sudo hdparm -t /dev/sdb /dev/sdb: Timing buffered disk reads: 344 MB in 3.00 seconds = 114.62 MB/sec max-p ~ % sudo hdparm -t /dev/sdc /dev/sdc: Timing buffered disk reads: 52 MB in 3.03 seconds = 17.15 MB/sec
sda is an SSD
sdb is a 7200 RPM HDD
sdc is a 16GB USB stick.You can use dd to write stuff to it and see how fast it went, I'm not doing it on mine because I have data on it, but it's around 3 Mb/s write speed, this is way worse than the HDD.
Unless you have a corner case where you need a lot of random-access over sequential read, it's probably not worth it at all. Your USB stick has to be at least faster than your disk if you want benefits of doing that.
From what I read, Windows uses this for random-access on small files. Linux already use RAM as a cache, so it would make more sense to me to use zram to increase the ram capacity so you can have more data on RAM for ultra-fast access instead of messing around with USB sticks.
Anway, what you want is probably bcache. Have fun.
thank you for your super-comprehensive reply. I'll test my system as soon as I can
decant swap partition on usb could be a good idea too
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
my hd :
[mattia@arch-dekstop ~]$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 200 MB in 3.02 seconds = 66.23 MB/sec
[mattia@arch-dekstop ~]$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 204 MB in 3.04 seconds = 67.08 MB/sec
[mattia@arch-dekstop ~]$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 200 MB in 3.03 seconds = 66.07 MB/sec
[mattia@arch-dekstop ~]$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 204 MB in 3.03 seconds = 67.37 MB/sec
[mattia@arch-dekstop ~]$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 200 MB in 3.01 seconds = 66.54 MB/sec
instead, my usb:
[mattia@arch-dekstop ~]$ sudo hdparm -t /dev/sdb
/dev/sdb:
Timing buffered disk reads: 50 MB in 3.01 seconds = 16.62 MB/sec
[mattia@arch-dekstop ~]$ sudo hdparm -t /dev/sdb
/dev/sdb:
Timing buffered disk reads: 50 MB in 3.00 seconds = 16.65 MB/sec
[mattia@arch-dekstop ~]$ sudo hdparm -t /dev/sdb
/dev/sdb:
Timing buffered disk reads: 52 MB in 3.12 seconds = 16.69 MB/sec
[mattia@arch-dekstop ~]$ sudo hdparm -t /dev/sdb
/dev/sdb:
Timing buffered disk reads: 52 MB in 3.12 seconds = 16.67 MB/sec
[mattia@arch-dekstop ~]$ sudo hdparm -t /dev/sdb
/dev/sdb:
Timing buffered disk reads: 52 MB in 3.12 seconds = 16.68 MB/sec
this close the problem....
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
Pages: 1