[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Basic storage buffer and queue question

Posted on 2012-12-30
23
Medium Priority
?
337 Views
Last Modified: 2013-01-02
I have a  basic question regarding storage, When data arrive to control unit,  it should keep it in queue and send it to necessary lun to write data.

Inside the lun we need to worry about storage pool, raid  and disks.

My question is where are the places I need to worry about cache and buffer queue?  I know this question is more general, but I'm trying to get the view.
0
Comment
Question by:mokkan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 6
  • 4
  • +1
23 Comments
 
LVL 123

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE^2)
Andrew Hancock (VMware vExpert / EE MVE^2) earned 448 total points
ID: 38731786
read and write cache on the storage processor, queue/buffer on the initiator.
0
 

Author Comment

by:mokkan
ID: 38731792
Thank you very much. If want to turn of for specific LUN, can you turn off? Or do we need to do it  per storage pool?

queue/buffer on the initiator mean, which initiator? Sorry, you mean by host level?
0
 
LVL 123

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE^2)
Andrew Hancock (VMware vExpert / EE MVE^2) earned 448 total points
ID: 38731818
yes, host level hba initiator.

that would very much depends on the configuration of your SAN, not usually cache is set to all, it's a global.
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

Author Comment

by:mokkan
ID: 38731835
I'm working on storwize 7000 storage and they were telling me that I can't turn off or on cache on specific LUN?
0
 
LVL 123
ID: 38731842
yes, thats quite normal for a SAN.

Most cache settings are global for ALL LUNs.
0
 
LVL 47

Assisted Solution

by:David
David earned 888 total points
ID: 38731844
Cache, buffer, queue, prefetch, and more exist in multiple places.  The more you tune the fewer I/Os have to go to disk, the less frequently you do them; the size of the I/Os are smaller; and your cache has higher utilization..

By far, the HDD is the slowest, least efficient, that can take thousands or millions of times longer to get data when compared to cached data within a host computer.

The HDD has a queue used to reorder instructions. This is not generally programable other than on/off.  However cache utilization algorithms; prefetch sizes; the read/write utilization are, depending on make/model.  You get the greatest bang for a buck here.

Next step up, the RAID controller (assuming hardware).  I/O stripe size and cache on/off is about all that is there, other than RAID, and some deep settings best not messed with.  Cache is often binary for a specific LUN.

The HBA/initiator/drivers will have a programmable queue depth, but cache is really only there to prevent interrupts. It isn't something most people are allowed to mess with.
0
 
LVL 56

Assisted Solution

by:andyalder
andyalder earned 664 total points
ID: 38732362
Why would you want to turn the storage cache off, it's backed up onto a local SSD should power fail.
0
 

Author Comment

by:mokkan
ID: 38732475
Hi Andyalder,

The reason I wanted to turn of the cache is that I can get better rate on write, when I turn off the cache I got  around 680MB/S write, but when i turn of I got 490 MB/S. I wanted to see which option would provide better write. What is the disadvantage of turning off cache?
0
 
LVL 56

Expert Comment

by:andyalder
ID: 38732542
The disadvantage of disabling cache is that it slows writes down, which seems to be the opposite of what you are seeing. How are you measuring it and where are you turning it off?
0
 

Author Comment

by:mokkan
ID: 38732554
I turn it off on specific LUN and writing data to it and it is increased by closed to 200 MB/S.
I'm using IBM storwize 7000
0
 
LVL 47

Assisted Solution

by:David
David earned 888 total points
ID: 38732572
Increasing by turning off cache is quite rare.  Personally, I think these numbers are highly suspect, especially if you are running some benchmark rather than real-world application I/O.  

So, specifically, how are you measuring throughput.   Not only that, but real-world, are your applications sequential writes?  Is this system serving as a data logger?
0
 

Author Comment

by:mokkan
ID: 38732866
I  just used DD command to write data which sequential write.  One more question, if I'm writing data as 32KB block into raw device and my raid stripe size is 256KB, where does conversion happens? Or it waits for another 8 blocks of data and write all together? Sorry for asking too much questions.
0
 
LVL 47

Assisted Solution

by:David
David earned 888 total points
ID: 38732890
Exactly what is the dd command you are using?  

(But it is moot, as no matter how you use it, there is no guarantee that you will get 100% 32K KB sized CDBs by the time it gets to the disk).   In fact, nothing at all even gets sent until a fflush() gets called by the kernel, and that varies depending on some settings.  

Also, real-world, this is a crappy benchmark because it doesn't represent a real-world test, unless all your computer does is write zeros in chunks of 32KB to a raw device.
0
 

Author Comment

by:mokkan
ID: 38732901
I'm using dd command like this. I'm writing in loop.

#!/bin/bash -x
for (( c=1; c<=20; c++ ))
do
  `time dd if=/dev/zero  of=/opt/testing123    bs=8k count=30000000`
  `time rm  /opt/testing123`
  `sleep 40`
done
0
 
LVL 47

Accepted Solution

by:
David earned 888 total points
ID: 38732928
Other flaws
 * You're writing to the filesystem, not hdd.  So FS parameters, blocking, journals, all NOT necessarily 8kb sized also gets done.  You should be using /dev/sdX if your desire is to test write performance on the hardware.
 * You are not writing anything that can be cached by the controller anyway, (except for small amount of housekeeping) that is why turning it off has some benefit.  Real-world this just doesn't happen unless your app is a real-time data logger to raw physical contiguous blocks.
 * filesystem housekeeping also forces mixed I/O sizes of typically 4KB random reads & writes.
 * 8KB I/Os WILL be aggregated by kernel, filesystem, and even device drivers.
 * Is /opt a separate partition, or part of the / filesystem?
 * You didn't 'nice' the dd, so the test competes with all other system I/O
 * Single threaded??  Your test doesn't even let multiple cores share the load.  At least run multiple instances in parallel and add a "wait" command to let them finish up.   [add & at end of each dd, followed by a wait command to let the n instances finish up, use different output files, set the start= on each instance to insure different parts of the disk]
 * dd doesn't sync the output.  You have I/O in a queue that has NOT been written to the HDD when 'time' has been run.     You should add a "sync" to flush all I/O to disk instead of waiting  40 seconds, and before determining the time if you want to use this script.
 * dd isn't even doing contiguous I/O to disk

In other words, garbage in => garbage out.  Your flawed benchmark resulted in flawed results that make you think no cache is a good thing.
0
 
LVL 56

Assisted Solution

by:andyalder
andyalder earned 664 total points
ID: 38733178
I agree, it's a meaningless test, especially using /dev/zero since the storage will de-duplicate it to nothing. Use iometer - http://www.iometer.org/doc/downloads.html and throw some random stuff at it, not just large blocks.
0
 

Author Comment

by:mokkan
ID: 38733218
Thank you very much. I'm doing it now using vdbench and will provide you the update.
0
 

Author Comment

by:mokkan
ID: 38737468
Thanks a lot guys, almost got whats happening.  If  I understand correctly, if I`m writing 32KB to raw device, in the storage my raid stripe size is 256KB. How is it going to write in storage? It waits for another 8 blocks (32 X8), and assemble together? And then write? Or it all depends on the storage? what is the general behavior in storage?
0
 
LVL 56

Assisted Solution

by:andyalder
andyalder earned 664 total points
ID: 38737528
It'll generally put it in the write cache until it can write a full width stripe unless it runs out of cache space or cache is disabled. Since the cache is backed up it can immediately tell the Os write operation complete even though it's not written to the physical platters yet.
0
 

Author Closing Comment

by:mokkan
ID: 38737578
Thanks a lot all of you. Your answers are very good.
0
 
LVL 56

Expert Comment

by:andyalder
ID: 38737867
Did you get the same anomalous rsult turning the cache off when you threw random test data at it?
0
 

Author Comment

by:mokkan
ID: 38737880
It was at least  150 MB/S  was increased on SSD drives when turn of the cache.
0
 
LVL 56

Expert Comment

by:andyalder
ID: 38737991
First time you mention SSD is now? You think we would guess you had SSD drives in it rather than spinning disks covered in rust? It's a completely different ballgame when you have NAND flash.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
August and September have been big months for VMware—from VMworld last month to our new Course of the Month in VMware Professional - Data Center Virtualization. We reached out to Andrew Hancock, resident VMware vExpert, to have a more in-depth discu…
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question