Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Does SSD cache really speed up IO access?
09-21-2015, 10:11 AM (This post was last modified: 09-21-2015 07:37 PM by kirbyzhou.)
Post: #1
Does SSD cache really speed up IO access?
Does SSD cache really speed up IO access?
I have done a test recently with my Drobo 5D, Mac, mSATA SSD and thunderbolt cable.

At first, I copied Xcode.app and Microsoft Office from '/Application' to Drobo to initialize the environment.
The I ran 'du' under Terminal repeatedly 20 times to measure the IO speed of small io access. '20 times' here is to ensure the SSD can cache it. (‘du' is a 'Read Only' utility.)
And I ran 'iostat' side by side to watch the actual disk IO.

Finally, there seems no significant difference between with or without SSD.
I have checked the Dashboard, the SSD status is OK.

The command line is below:

#] for ((i=0;i<20;++i)); do (set -x; time du -sh bak/*; sleep 120; ); done
#] iostat -d disk3 1

1. Without SSD
time:
real 1m37.250s
user 0m0.762s
sys 0m25.045s

iostat:
disk3
KB/t tps MB/s
8.00 569 4.45
8.00 579 4.52
8.00 572 4.47
8.00 538 4.21
8.00 552 4.31
8.00 571 4.46
8.00 577 4.51
8.00 506 3.95
8.00 488 3.81
8.00 472 3.68
8.00 517 4.04
10.74 712 7.46
8.00 485 3.79
8.00 544 4.25
8.00 535 4.18
8.00 484 3.78
8.00 581 4.54
8.00 594 4.64
8.00 565 4.41
8.00 556 4.34

2. With SSD
# to ensure the SSD has chance to cache the frequently accessed block, I ran 'du' for 20 times, the result is the last time.

time:
real 1m21.492s
user 0m0.768s
sys 0m24.854s

iostat:
disk3
KB/t tps MB/s
8.00 627 4.90
8.00 623 4.87
8.00 605 4.73
8.00 619 4.84
8.00 570 4.45
8.00 552 4.31
8.00 546 4.27
8.00 594 4.64
8.00 648 5.07
8.00 632 4.94
8.00 602 4.70
8.00 628 4.91
8.00 646 5.04
8.00 607 4.74
8.00 631 4.93
8.00 628 4.91
8.00 607 4.74
8.00 600 4.68
8.00 630 4.92
8.00 650 5.08

3. On the Mac internal fusion drive
time
real 0m27.980s
user 0m0.470s
sys 0m18.573s

iostat
disk0 disk1
KB/t tps MB/s KB/t tps MB/s
0.00 0 0.00 0.00 0 0.00
12.94 127 1.60 0.00 0 0.00
7.72 1445 10.89 0.00 0 0.00
7.56 1562 11.54 0.00 0 0.00
7.58 1795 13.28 0.00 0 0.00
7.57 1957 14.47 0.00 0 0.00
7.68 1705 12.79 0.00 0 0.00
7.69 1402 10.53 10.00 2 0.02
7.71 1405 10.58 10.00 2 0.02
7.62 1566 11.66 4.00 11 0.04
7.65 1650 12.32 0.00 0 0.00
7.61 1417 10.54 0.00 0 0.00
7.66 1415 10.58 0.00 0 0.00
7.84 1750 13.40 0.00 0 0.00
7.88 1612 12.40 0.00 0 0.00
7.89 1522 11.73 0.00 0 0.00
7.89 1470 11.32 0.00 0 0.00
8.62 1952 16.44 0.00 0 0.00
7.89 1385 10.67 0.00 0 0.00
7.87 1354 10.40 0.00 0 0.00
Find all posts by this user
Quote this message in a reply
09-21-2015, 08:43 PM
Post: #2
RE: Does SSD cache really speed up IO access?
doing a "benchmark" data transfer to Drobo, will has very little significant speed improvement from the mSATA caching.

The firmware from Drobo in terms of mSATA acceleration works with "HOT data" which is frequent data. It will improve small IOs as well.

- Example:
If Drobo has said 10000 blocks of data in it, and it noticed that the block 1001, 2000 and so on are frequently access then it will hot cached these blocks of data in the mSATA to speed up the read. As it is now cached in the mSATA, as to reading from the HDD.

mSATA acceleration in Drobo from what I see will improvement workflow that involves "library" files... or some form of DB access. If certain transnational DB or library files are frequently.. access.. these will be cached in mSATA and hence improves the workflow speed..
Find all posts by this user
Quote this message in a reply
09-22-2015, 07:18 AM (This post was last modified: 09-22-2015 07:20 AM by kirbyzhou.)
Post: #3
RE: Does SSD cache really speed up IO access?
I know what you mean. I am also a computer engineer.

The program 'du' which I take to do the benchmark, is a console utility to calculate the folder size. It only visit the metadata of filesystem, The filesystem metadata is classical HOT and small data on disk. The folder size is only less than 20G, the metadata of the folder I guess is less than 500M.

I ran 'du' for 20 times to simulate frequently read access, and to make the blocks which it visit become 'HOT'. But I cannot see significant performance improvement.
Find all posts by this user
Quote this message in a reply
09-22-2015, 07:43 AM (This post was last modified: 09-22-2015 07:46 AM by Paul.)
Post: #4
RE: Does SSD cache really speed up IO access?
hi kirby, i'm wandering something...

sometimes when people look at lots of statistics, or do statistical analysis, they can sometimes get bogged down with the numbers. (i know i do sometimes) Smile

so i was thinking what if you simply did some real-world usage examples?
eg, instead of running those kind of statistical benchmarks, what if you tried something more simple as follows:


- to use the computer and drobo
- to manually (or via a batch filescript if you prefer) perform a certain operation on a some files and folders and to time how long it actually takes, in seconds).
- to then repeat that operation, a few times, and measure it that way.


you could also then reboot just the computer, and then repeat the operations,
and then you could reboot both drobo and computer, and repeat the operations
and see how the speeds go and if they are different after reboots etc

this way, you are actually running the tests from the front-end of the system rather than the back end (so to speak) Smile

just an idea for you.

maybe the process could be copying and pasting folders, or viewing image galleries, or reading the same images and processing them via a photo editor into an html gallery etc etc.

(btw i have XP home SP2, a Drobo v1 with 2x 1TB/2x 1.5TB WD greens, & a bkp Drobo v2 with the same + a DroboShare: unused)
& a DroboS v2 with 3xWD15EADS &2x1TB in DDR mode on win7, & a drobo5D (all usb)
  • btw i did a sustained (write) operation for about 6 hours, and got 13.2MB / sec ...objection? "sustained" :)
    (16.7MB/s on a v2 & 47-96MB/s drobo-s)
Find all posts by this user
Quote this message in a reply
09-22-2015, 05:48 PM (This post was last modified: 09-22-2015 05:49 PM by kirbyzhou.)
Post: #5
RE: Does SSD cache really speed up IO access?
(09-22-2015 07:43 AM)Paul Wrote:  hi kirby, i'm wandering something...
...

I use thunderbolt cable to connect iMac with Drobo 5D.
The array is consist of 4T*2 and 6T*2 drivers, totally 3 drives.

First, I copy 'Xcode.app' from /Application to /Volume/Drobo/bak/, then run the script. Here is the script:
it runs du to calculate the size of the folder 'Xcode.app' for 20 times. And measure the time cost of each time.

for ((i=0;i<20;++i)); do (set -x; time du -sh /Volumes/Drobo/bak/Xcode.app/; sleep 10; ); done


The time cost of each time is around 60s~70s. The 'dashboard' 'iostat' tells me the IO is about 600 transaction/s or 4~5MB/s.
No significant difference between with or without SSD.

Maybe you can retry my mini benchmark? It is very easy to perform.
Find all posts by this user
Quote this message in a reply
09-23-2015, 08:02 AM (This post was last modified: 09-23-2015 08:02 AM by Paul.)
Post: #6
RE: Does SSD cache really speed up IO access?
thanks for the info kirby, and one liner compact script Smile

calculating the sizes of files and folders, might just be filesystem information.... is there any other test that you can try, such as trying to copy and paste a particular set of folders with files, into say 3 other folders (eg 3 copy and paste operations)

and then deleting the copies and attempting again,
+ then rebooting with out the msata and trying again?

(i say this as actually accessing the data content rather then filesystem data might have different results)

(btw i have XP home SP2, a Drobo v1 with 2x 1TB/2x 1.5TB WD greens, & a bkp Drobo v2 with the same + a DroboShare: unused)
& a DroboS v2 with 3xWD15EADS &2x1TB in DDR mode on win7, & a drobo5D (all usb)
  • btw i did a sustained (write) operation for about 6 hours, and got 13.2MB / sec ...objection? "sustained" :)
    (16.7MB/s on a v2 & 47-96MB/s drobo-s)
Find all posts by this user
Quote this message in a reply
09-23-2015, 06:37 PM (This post was last modified: 09-23-2015 07:31 PM by kirbyzhou.)
Post: #7
RE: Does SSD cache really speed up IO access?
In my opinion, the filesystem metadata is the most valuable things to cache, so the du speed can very directly to show you the problem.
But as your wish, I have done another mini bench to demonstrate the problem.
It is a little hard, because I need to avoid the OS level disk cache in memory.
If data is cached by OS, the IO would not passed to Drobo, but we need to check whether the cache inside Drobo is OK.
So I take a syscall to turns OS data caching off.


# Here is the python script 'minibench1.py'
=====
Code:
#!/usr/bin/python
# it reads about 640MB from disk, and always read the same blocks each run.

import sys, os, random, fcntl
def do_test(fd, filesize):
    random.seed(1)
    for i in xrange(10000):
        offset = random.randint(0, filesize/65536)*65536;
        print offset
        os.lseek(fd, offset, os.SEEK_SET)
        os.read(fd, 65536)

def main():
    fd = os.open(sys.argv[1], os.O_RDONLY);
    filesize = os.fstat(fd).st_size
    fcntl.fcntl(fd, 48, 1) # disable OS cache on Mac
    do_test(fd, filesize)

main()

=====
run it as below:
First, prepare a big file called X on drobo with 'dd'
]# dd if=/dev/zero of=/Volumes/Drobo/X bs=1m count=12000

Then run the script:
]# for ((i=0;i<20;++i)); do time python minibench1.py /Volumes/Drobo/X; done

=====
Result:
Time Cost:
About 1m50s ~ 1m55s each time.
IOStat:
KB/t tps MB/s
64.00 61 3.81
64.00 57 3.56
64.00 68 4.23
64.00 63 3.93
64.00 60 3.73
64.00 58 3.61
64.00 64 3.98
64.00 68 4.23
64.00 66 4.10
64.00 63 3.93
The SSD cache inside Drobo seems not activated.

===
Note:
Sometimes, you can found that the time cost of mini bench is around 1secs, but it is caused by the OS memory cache ----- you can see there is no IO activity through the iostat report.
At this time, you should either reboot the Mac of the Drobo to invalidate the OS memory cache, and retry the test.
Find all posts by this user
Quote this message in a reply
09-24-2015, 09:11 AM
Post: #8
RE: Does SSD cache really speed up IO access?
thanks kirby, you might be right,

just to keep things slightly simple for this particular test...
do you have any folders on your computer that contain documents and textedit text files etc, and photographs, (such as on windows there is a mypictures folder and mydocuments folder)

im not sure if they are treated differently or as special folders on mac, but rather then trying to generate a file, what happens if you try to copy and paste them multiple times?

and what happens if you try to calculate parity such as using the mac version of quick par (for all files in 1 particular folder)?

i only ask these as i do not have a mac, and i am often accessing and copying data and using quickpar to calculate parity, and if i was to get an msata for my 5d, speeding up things like that would be of benefit to me. (this was why i mention the simpler tests, as it is a general use-case of real life use for me, as i wouldnt normally be writing scripts just to see if there is an increase, id be doing the exact same operations that i usually do, and timing that) Smile

(btw i have XP home SP2, a Drobo v1 with 2x 1TB/2x 1.5TB WD greens, & a bkp Drobo v2 with the same + a DroboShare: unused)
& a DroboS v2 with 3xWD15EADS &2x1TB in DDR mode on win7, & a drobo5D (all usb)
  • btw i did a sustained (write) operation for about 6 hours, and got 13.2MB / sec ...objection? "sustained" :)
    (16.7MB/s on a v2 & 47-96MB/s drobo-s)
Find all posts by this user
Quote this message in a reply
09-24-2015, 09:36 AM (This post was last modified: 09-24-2015 09:47 AM by kirbyzhou.)
Post: #9
RE: Does SSD cache really speed up IO access?
Paul, Maybe, I say maybe.
Your feeling of 'speeding up things' may be caused by the OS level memory cache.
If you access files by quick par or other Apps, the file would be cached in your computer's memory by the OS.
Next time you access it, the Drobo would do nothing than sleep, OS returns content to App from its own memory.
I am trying to do another bench now, the size of folder 'bak' is big enough to prevent OS caching it wholly. So I can check the benefit of SSD.

kirbyzhou@Kirby-iMac27:~ $ ll /Volumes/Drobo/bak/
total 0
drwxrwxr-x 3 kirbyzhou staff 102 9 18 21:23 Microsoft Excel.app
drwxrwxr-x 3 kirbyzhou staff 102 9 18 21:23 Microsoft OneNote.app
drwxrwxr-x 3 kirbyzhou staff 102 9 18 21:25 Microsoft Outlook.app
drwxrwxr-x 3 kirbyzhou staff 102 9 18 21:24 Microsoft PowerPoint.app
drwxr-xr-x 3 kirbyzhou staff 102 2 13 2015 Microsoft Remote Desktop.app
drwxrwxr-x 3 kirbyzhou staff 102 9 18 21:24 Microsoft Word.app
drwxr-xr-x 3 kirbyzhou staff 102 9 17 20:34 Xcode.app


kirbyzhou@Kirby-iMac27:~ $ for ((i=0;i<20;++i)); do ( set -x; find /Volumes/Drobo/bak/ -type f -print0 | time xargs -0 shasum > /dev/null; ); done

## Waiting for result
Find all posts by this user
Quote this message in a reply
09-25-2015, 04:36 AM
Post: #10
RE: Does SSD cache really speed up IO access?
Hi Kirby, hi Paul:

I'm very interested to read your findings here - they seem to mirror what I was finding about 18 months ago: http://www.drobospace.com/forums/showthr...http://www.drobospace.com/forums/showthread.php

I've since been poking around on-and-off to try and find some time to investigate this further. My next aim will be to build up a Windows machine and try running the Drobo with Iometer, as Drobo demonstrate on https://www.youtube.com/watch?v=V9E2WcE_nqs (although admittedly with the B1200i, not the 5D).

I've also tried raising it with Drobo technical support, and never received a response which I could truly understand and trust as an explanation.

Fingers crossed that we finally get somewhere with this...

Thanks.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: