06-20-2016, 11:32 AM
Doh. Should have thought of that. It works with the powered hub, and access is much faster than access to the local microSD card.
As I said earlier, I'm running Ubuntu Linux, and my SSD comes ready-built with a VFAT filestore. I had to mount the SSD by hand. I plugged it in and my system created the device /dev/sda1. I then did:
$ sudo mkdir /mnt/verbatim
$ sudo mount -t vfat /dev/sda1 /mnt/verbatim
I can access the disk as root, but for some reason, I can't create files on it belonging to an ordinary user:
$ sudo mkdir /mnt/verbatim/junk
$ sudo chown ubuntu /mnt/verbatim/junk
chown: changing ownership of '/mnt/verbatim/junk': Operation not permitted
I can find lots of explanations of that error message, but they all advise me to run chown under sudo, which I am doing.
So I have to run my test program using sudo. (More work needed!)
To test the performance I used a hacked version of a Go program written by a friend.
For those who don't know, UNIX systems cache recently used bits of files in memory, both when reading and writing them. To test disk access speed you need to read and write enough data to defeat the cache. However, if you create too many files in one directory, that can slow down access significantly - about 100 files per directory is OK. Also, you have to avoid filling the disk partition. As the partition approaches capacity, write speed reduces significantly as the system scrabbles around trying to find spare blocks to write to.
My Pine64 has 2GB of memory, so my program creates 25 directories and creates 100 files in each, writing 1 Megabyte to each file. So it creates 2.5 GB of data.. Once it's created all the files, it reads them all back, one by one. However big the disk memory cache is, this will flood it, and the average read and write times that you get will give some idea of the real performance you would get when handling a big file, such as a 4K video.
In fact, when writing to the solid state disk, the performance settled down at around the fourth or fifth directory, which gives a clue as to how big the memory cache is. When writing to the Micro SD card, performance varied throughout the test between 12 and 18 seconds per directory. The read speeds were fairly consistent for both devices.
The results were:
Write Read
Solid State Disk connected via USB2: 30 MB/sec 24 MB/sec
MicroSD: 9 MB/sec 17 MB/sec
The solid state disk is meant to connect via a USB3 connection. Connecting via USB2 slows it down significantly. I look forward to a future version of the Pine64 with USB3 ports.
Conclusion:
You will get different results depending on which solid state disk package you use, and which microSD card, but if you want to use your Pine64 as a conventional desktop computer, a solid-state disk should speed up the performance, especially on disk writes. You will need a powered USB hub to make it all work.
You also need to be able to mount the disk and access it as a user other than root. Anybody know how to do that?
As I said earlier, I'm running Ubuntu Linux, and my SSD comes ready-built with a VFAT filestore. I had to mount the SSD by hand. I plugged it in and my system created the device /dev/sda1. I then did:
$ sudo mkdir /mnt/verbatim
$ sudo mount -t vfat /dev/sda1 /mnt/verbatim
I can access the disk as root, but for some reason, I can't create files on it belonging to an ordinary user:
$ sudo mkdir /mnt/verbatim/junk
$ sudo chown ubuntu /mnt/verbatim/junk
chown: changing ownership of '/mnt/verbatim/junk': Operation not permitted
I can find lots of explanations of that error message, but they all advise me to run chown under sudo, which I am doing.
So I have to run my test program using sudo. (More work needed!)
To test the performance I used a hacked version of a Go program written by a friend.
For those who don't know, UNIX systems cache recently used bits of files in memory, both when reading and writing them. To test disk access speed you need to read and write enough data to defeat the cache. However, if you create too many files in one directory, that can slow down access significantly - about 100 files per directory is OK. Also, you have to avoid filling the disk partition. As the partition approaches capacity, write speed reduces significantly as the system scrabbles around trying to find spare blocks to write to.
My Pine64 has 2GB of memory, so my program creates 25 directories and creates 100 files in each, writing 1 Megabyte to each file. So it creates 2.5 GB of data.. Once it's created all the files, it reads them all back, one by one. However big the disk memory cache is, this will flood it, and the average read and write times that you get will give some idea of the real performance you would get when handling a big file, such as a 4K video.
In fact, when writing to the solid state disk, the performance settled down at around the fourth or fifth directory, which gives a clue as to how big the memory cache is. When writing to the Micro SD card, performance varied throughout the test between 12 and 18 seconds per directory. The read speeds were fairly consistent for both devices.
The results were:
Write Read
Solid State Disk connected via USB2: 30 MB/sec 24 MB/sec
MicroSD: 9 MB/sec 17 MB/sec
The solid state disk is meant to connect via a USB3 connection. Connecting via USB2 slows it down significantly. I look forward to a future version of the Pine64 with USB3 ports.
Conclusion:
You will get different results depending on which solid state disk package you use, and which microSD card, but if you want to use your Pine64 as a conventional desktop computer, a solid-state disk should speed up the performance, especially on disk writes. You will need a powered USB hub to make it all work.
You also need to be able to mount the disk and access it as a user other than root. Anybody know how to do that?