CIFS Performance 1/3 of iSCSI Performance

Status
Not open for further replies.

dascione

Cadet
Joined
Jun 2, 2013
Messages
6
It seems like this is being covered in more than one place. I've done searches and changed lots of settings in samba before reverting back to normal.

My current setup is an arrangement of 12x 7.2k drives varying between 2TB, 1.5TB and 1TB, two 60GB SSDs, one for L2ARC and the other for cache (ZIL). The machine itself is an i7 ivy-bridge with 12GB of RAM. The total pool size is 12.4TB.

I have only been playing with CIFS until yesterday and getting speeds at around 45-55 MB/s, not bad but as I now see can be much better. Mounting an iSCSI drive with no special setup I cap my 1Gb connection with my test box, it begins with a burst up to 270MB/s and finally levels out after a few seconds around 150MB/s. Locally on the server, the operating system raid is on a different SATA bus than the SSDs and the entire array, and I receive speeds upwards of 300MB/s there (probably bottlenecked at my operating system raid).

I will be using iSCSI for one or two operations but I wanted CIFS for the main use of this system and that kind of speed isn't really going to cut it for me. I was wondering if anyone had any similar experiences with this. I've seen the opposite true in some threads and also just plain slow CIFS speeds but none really that have seen slower than iSCSI. Some examples of parameters I've changed are 'read size', 'write cache size', 'max xmit', etc. Basically been following http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/speed.html but I haven't seen any success.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I'm not sure I've ever seen a genuine valid use case for an L2ARC on this forum ever.

Ooo. I can fix that! ;-)

The poor little N36L here, suffering little beast, gets all the beatings. 16GB. It used to suck down ESXi backups with sync=disabled at ~400Mbit/sec. I fixed that by adding a ZIL, at which point it dropped to ~200Mbit/sec but was "doing it right" for purposes of NFS data integrity. But I also wanted to increase the amount of time we could retain images, and since buying more disk involved a large expense, and since the amount of space that I actually needed to dedup was only around 1-2TB of space... it made sense to look at the possibility.

So I first counted the blocks existing on the pool. It turned out that with 18.5 million blocks on the pool, at 320 bytes per, that's 7GB. This was a worryingly large number; the ARC on a 16GB system is about 10GB, and the ARC tries to use only about 1/4th of that for metadata, so that's only around 2.5GB available.

There are more aggressive rules around, though, such as these here, suggesting 20GB of system RAM per TB of dedup'ed data, which was suggesting as much as 32GB-48GB of system RAM. Fail.

So, since we were "in the ballpark", the obvious answer was to use L2ARC and let ZFS use it if needed. And this works, exceedingly well.

Code:
# zpool list pool
NAME       SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
pool      7.25T  4.18T  3.07T    57%  1.00x  ONLINE  /mnt

Code:
# zpool list pool
NAME       SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
pool      7.25T  2.14T  5.11T    29%  2.52x  ONLINE  /mnt


That's a shockingly awesome difference. It is also making heavy use of the L2ARC device:

Code:
# iostat da2 1
       tty             da2             cpu
 tin  tout  KB/t tps  MB/s  us ni sy in id
   0     1 96.70  34  3.18   5  0 19  1 75
   0   126 113.20 204 22.54   0  0 86  1 12
   0    45 114.25  71  7.90   3  0 55  3 39
   0    44 120.17 334 39.15   0  0 70  3 27
   0    45 108.71 129 13.65   1  0 81  3 15
   0    45 122.67 208 24.89   0  0 56  5 39
   0    45 114.93 250 28.02   0  0 85  1 14
   0    45 119.24  68  7.91   0  0 61  3 36
   0    45 124.63 326 39.63   0  0 62  6 32
   0    45 72.33  48  3.39   4  0 87  1  9


which on closer examination appears to be about 90% writes and 10% reads, so I'm thinking that this probably isn't too good for a MLC flash device. I'm still thinking about that though.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525

dascione

Cadet
Joined
Jun 2, 2013
Messages
6
Alright, I'll first start off by apologizing for the lack of information, honestly I didn't think anyone would even respond and it was late (for me at least) last night and I was rushing the post along. I also figured that given the amount of posts covering the topics here would just hurt my chances of getting a response anyway.

The FreeNAS server is currently running an aggregated connection on two broadcom NICs utilizing load-balancing (wasn't really expecting better performance from one node, more from multiple nodes). The use of this system is very specific as I already have two different SANs running in my production environment. So yes, this is my first home-built and despite missing some things I have been reading a lot and trying to do my own research. The 'war' between whether or not to use ZIL and/or L2ARC drives is off the charts when researching the topic. After receiving poor performance on write speed for my array (I don't have my result logs with me at work) I decided to give in and buy an SSD for the log disk. And for every one article or manual that said L2ARC could do more harm than good, there was another defending it as well so I figured I would try it in my configuration. After seeing the write speed increases using the log disk I decided to keep the cache drive in until I could do some real read testing, after polishing the write portion of this build. I want to see some concrete results before I go and either send it back or add it to my ZIL, as I do have a low amount of RAM.

Most of the write tests I have done so far you are absolutely correct, they are skewed and untrue. I was using it as more of a reference to the magnitude of difference between the two methods of network storage. Most files copied over hovered in the range of 9-11GB a piece, some higher, some lower.

If I could get some real testing methods, other than doing zero or random writes on the machine itself, I think that I would be able to tweak my setup better. Obviously I am doing something wrong if my CIFS speeds are as low as they are.

Code:
# dd if=/dev/random of=/mnt/Pool/ddfile bs=1024k count=20k
20480+0 records in
20480+0 records out
21474836480 bytes transferred in 284.909925 secs (75374126 bytes/sec)
# dd if=/dev/zero of=/mnt/Pool/ddfile bs=1024k count=20k
20480+0 records in
20480+0 records out
21474836480 bytes transferred in 47.109886 secs (455845648 bytes/sec)


Seeing how random is more CPU intensive I don't mind being at around 75 MB/s but as for writing zeros, obviously it isn't much of an issue but still shows off the ZIL's strength.

Also, as an end note, my drive configuration is as follows:
4x 2TB Seagate Barracuda (raidz)
3x 1.5TB Seagate Barracuda (raidz)
5x 1TB Seagate Barracuda (raidz)

Unfortunately it's all I have to work with right now.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
The ZIL isn't in the write path. It is merely a log for writes that were committed with sync. It should be approximately valueless for CIFS and iSCSI purposes under the default configurations because the main operations that might be affected would be metadata writes, not actual file contents.

L2ARC is useful in some situations, but you need certain circumstances to exist for it to truly pay off. It primarily has the capability to reduce I/O to frequently accessed pages in the pool, but that is meaningless unless you have a very busy pool - that doesn't mean just reading large files continuously, incidentally. Having L2ARC can actually be harmful in other situations, the classic example being where you are squeezing main memory availability in order to support L2ARC, when the working set would have otherwise fit inside main memory.

Without information on the rest of your FreeNAS system, it is hard to guess at whether this is a FreeNAS or a Windows problem.

Without information on your Windows platform, it is also hard to guess at whether this is a FreeNAS or a Windows problem.

You probably won't attract much interest in discussing your problem without significant extra detail, sorry.
 

dascione

Cadet
Joined
Jun 2, 2013
Messages
6
I was actually going to bring up the aspect of using synchronous writes for CIFS or iSCSI. I know CIFS has a few options such as syncio or synconclose but I wasn't sure if this was a practice used with ZIL or if it would even benefit. Like I've said before, I am new, I'm sure you guys hear that a lot, but I'm not looking for the fastest solution here I am looking to really learn and take something away from this. Anyone can just buy some SAN units and throw them into production, I want this one to be my own.

Some more spec information on my system:
Motherboard: Asus P6X58D Premium
Processor: LGA 1366 Core-i7 920 2.67 GHz Quad-Core (Pretty sure I said Ivy Bridge in my first post but I'm certain now that's not correct, could possibly be a Sandy)
Memory: 6x 2GB Kingston DDR3 Dual-Ranked RAM
Array Raid Card: Areca ARC1231ML VER:B PCI-E 12-Port SATA II
Operating System Raid Card: FastTrak 2-Port SATA II (Don't remember model number, not really important though)
SSDs are plugged into SATA III ports on the motherboard

I mentioned the array drives above, the SSDs are both Intel 520 Series 60GB and my operating system disks are twin 160GB 7.2k drives (not that it matters).

As for specs on systems I've done tests with, they do vary. I believe the best system I've done testing with has been a PowerEdge R510 with 32GB of RAM and twin quad core Xeon E5630, this has 15k SAS drives in it so I use it as the main test box. I have two of them, one has Server 2012 and the other Server 2008 R2, both using regular Windows explorer to read and write to CIFS shares, both using Windows iSCSI initiator to mount iSCSI drives.

If anymore information is needed or tests I can run to retrieve results I can do that. I'm just a little stuck and from the looks of both of your responses, making an ass out of myself with the setup of this box. I am actively reviewing the FreeNAS wiki to try and retain some more of this information. Anymore help you guys are willing to give is greatly appreciated.
 

budmannxx

Contributor
Joined
Sep 7, 2011
Messages
120
Your mobo supports up to 24GB of RAM. Before you do anything else, put in another 12GB.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Actually, the 920 is the first gen i7s, aka Nahelem. I know because I bough mine in Oct/Nov 2008 the day they came out. The CPU is plenty powerful enough to work as a FreeNAS server though.

You didn't include your hard drives or zpool configuration. Hopefully you aren't using the hardware raid card in a raid configuration.

Did you create any sysctls or tunables? If so post them below.
 

dascione

Cadet
Joined
Jun 2, 2013
Messages
6
Your mobo supports up to 24GB of RAM. Before you do anything else, put in another 12GB.

I would rather wait until I'm sure I need it but I was already considering it so I might just pick up a new set of RAM tomorrow. Reading the best practices for FreeNAS I found, and I quote, "it is a general rule of thumb to have at least 1GB for every 1 TB of pool space". Which 12GB is cutting it close and I never was a good 'at least' guy, more of an 'over the top' one.

Actually, the 920 is the first gen i7s, aka Nahelem. I know because I bough mine in Oct/Nov 2008 the day they came out. The CPU is plenty powerful enough to work as a FreeNAS server though.

You didn't include your hard drives or zpool configuration. Hopefully you aren't using the hardware raid card in a raid configuration.

Did you create any sysctls or tunables? If so post them below.

Way off with the CPU, but I think you're right, I'd rather it not be more powerful than the hexa-core in my desktop, it is just a NAS device. Not really sure where it came from even, found it in our stock room in a plain white box with the stock cooler, good thing it was 1366 to fit my mobo.

Sorry about the spread of information, my pool config is in one post and my raid card is in another. Here they are here:
4x 2TB Seagate Barracuda (raidz)
3x 1.5TB Seagate Barracuda (raidz)
5x 1TB Seagate Barracuda (raidz)

Array Raid Card: Areca ARC1231ML VER:B PCI-E 12-Port SATA II

Not too crazy about mixing drive sizes but at least I have redundancy with each raidz and the combined pool is about 12TB. Also, they are all of the same Seagate line so that made me feel a little bit better as well.

Also, I have not made any parameter or other changes to the kernel, it is almost a fresh out of the box install. I did play with CIFS settings a bit but I did revert after having nothing but one bad test after another.

I'm not sure about your motherboard(I ditched ASUS years ago) but my first gen i7 slot 1366 motherboard from Gigabyte can take 8GB DIMMs.
 

dascione

Cadet
Joined
Jun 2, 2013
Messages
6
So you have 8TB+4.5TB+5TB=17.5TB, which means you should have 17.5+6GB of RAM... or roughly 24GB of RAM? And you're upset with poor performance at 12GB.. sigh.

To be honest, this thread really feels like a waste of my time. Buy 24GB of RAM and when performance is still flakey then post back you have a problem. I really am tired of having to convince people to upgrade their RAM and would prefer that I read and respond to their ramblings without taking my advice anyway. It's not like its not spelled out in the manual, in my guide(multiple times because I'm COMPLETELY sick of telling people to upgrade their ram twice a week), and you did do some upgrade and it got better.

Alright, first of all, as per FreeNAS hardware recommendations they say 'For systems with large disk capacity (greater than 8 TB), a general rule of thumb is 1 GB of RAM for every 1 TB of storage.' that to me says when all is said and done, including redundancy your storage capacity. In my case that would be exactly 12.1069TB, calculating 1024KB per MB instead of 1000 per MB as hard drive manufacturers do. Indeed, that number still sells me a little short on RAM but back to the topic I originally started this off with, not the poor performance of my server but the unusual speeds I am receiving with CIFS compared to iSCSI.

I really never asked you to 'waste your time' nor did I really ever ask for your condescending responses to my questions. I do thank you, jgreco and even bud for some helpful pieces of information but I'm not about to keep using this forum to be belittled or as another user to listen to your power trip rants. I have a deep respect for some of the knowledge some of you hold, especially jgreco I think he's incredibly intelligent looking at some other helpful posts he has around this forum and I'll keep looking around and do my own research to hopefully get a taste of that.

Sorry for wasting your time, no need for anymore posts on this thread. Since you are a moderator you can just close it.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Couple of things:

1. You cannot remove redundancy disks from the math equation. Whether you have a 5x4TB in a RAID0, RAIDZ1, or RAIDZ3, you need he same amount of RAM per the thumbrule(20GB.. I'll ignore the conversion from a binary TB to a decimal TB for now). The parity data is cached also because if the actual data is corrupted you'll want the parity data in RAM also. Keep in mind that the thumbrule is not a 100% certainty. Some needs much much more, and some need less. Some don't care about performance, but people like you and I do.

2. You're really splitting hairs trying to save approximately 7% of your RAM in the math. It doesn't matter what the math really says, it only matters how much gives you good performance. For me, with my 18x2TB RAIDZ3 and my typical use, I needed to go to 20GB of RAM. 12GB of RAM was horrible, 16GB of RAM was better(but not perfect) and 20GB of RAM worked for me. I also expect that if I add more disk space later I'd better buy another 8GB stick of RAM. Trying to argue that 7% seems like a waste of time since you can't argue with your computer that you have enough RAM. I also know that when friends visit and we use my server alot performance takes a big dump. So if I ever plan to have a long term roommate I'd better get more RAM.

3. The line you quoted from the manual is wrong. It didn't define large disk arrays as 8TB...

As the person who most recently laid hands on the Hardware Recommendations RAM sizing section, I'll point out that it was left somewhat open-ended, because rules of thumb are used when accurately forecasting something like this is not as straightforward as it ought to be. One could reasonably read it as "8GB RAM" being sufficient for a system of 4 x 4TB in RAIDZ2 (8TB usable). One would also not be misreading it as "8GB RAM for the system /plus/ 16GB to handle the 4 x 4TB." Neither answer is strictly wrong, though it ought to be clear that the first system has much less RAM and the second has much more, and that the second is likely to perform much better. Both should result in a usable system. The revision was primarily designed to give people some idea as to what might be reasonable.

The original revision was, I believe, intended to make it sound like "6GB base plus 1GB per TB of disk" which is good advice, but due to the way it was structured, users were glomming on to only whichever part of that was convenient, and 6TB is a bit too small for almost any system, and sizing on disk space if you only have two 1TB drives doesn't even work. Further, that was written in a FreeBSD 8.0/ZFS v15 era, when 2TB was king, and RAM was more expensive. The rule of thumb more-or-less originates with Solaris anyways, where it was meant as a way to help size busy fileservers. A lot of forum users here are not operating a busy departmental fileserver.

I've been experimenting on the bench with a 12 x 4TB disk FreeNAS host. Built on an ESXi virtualization platform, it allows me to modify the amount of RAM allocated, and I've been playing games with it. One of the more striking things is that the complexity of ZFS often results in unpredictable behaviour. For example, I had an 11 disk RAIDZ3 (~30TB usable) on a system with 8GB RAM. For basic single user file operations, I wasn't seeing any significant performance degradation over a system configured with 32GB RAM. It was also scrubbing at about the same speeds. Turns out it was limited by CPU speed (E5-2609 isn't a speed demon at RAID XOR). Going to mirrored, then, performance was much better on an 8GB RAM for mirrored disks while scrubbing, but the part I haven't puzzled out yet is why it was still 40% faster at scrubbing if I took it out to 32GB. I might try that again later today at 8GB increments from 8GB to 64GB just to see what happens...
 

dascione

Cadet
Joined
Jun 2, 2013
Messages
6
1. You cannot remove redundancy disks from the math equation. Whether you have a 5x4TB in a RAID0, RAIDZ1, or RAIDZ3, you need he same amount of RAM per the thumbrule(20GB.. I'll ignore the conversion from a binary TB to a decimal TB for now). The parity data is cached also because if the actual data is corrupted you'll want the parity data in RAM also. Keep in mind that the thumbrule is not a 100% certainty. Some needs much much more, and some need less. Some don't care about performance, but people like you and I do.

Reading the best practices I had no idea whether or not to leave or work with the redundancy when planning RAM requirements, just something else I've learned here.

2. You're really splitting hairs trying to save approximately 7% of your RAM in the math. It doesn't matter what the math really says, it only matters how much gives you good performance. For me, with my 18x2TB RAIDZ3 and my typical use, I needed to go to 20GB of RAM. 12GB of RAM was horrible, 16GB of RAM was better(but not perfect) and 20GB of RAM worked for me. I also expect that if I add more disk space later I'd better buy another 8GB stick of RAM. Trying to argue that 7% seems like a waste of time since you can't argue with your computer that you have enough RAM. I also know that when friends visit and we use my server alot performance takes a big dump. So if I ever plan to have a long term roommate I'd better get more RAM.

I wasn't trying to defend only having 12GB of RAM in this server, rather understand the process of deciding how much RAM one needs/should start off with and work from there. Obviously there is no straight answer but there is always recommendations for starting points.

4. I understand your anger towards me. And believe me you aren't the first to get upset with the answer of "add more RAM" and I'm sure you aren't the las. People don't like being told to spend money, especially when you're also convinced that "I must have enough". But I have just a little experience with ZFS(looks at his 3000+ posts) and it seems logical that more RAM would help. And I knew what your response would be because every person that gets told to upgrade RAM hates the answer. I fought with my own server for almost 2 months before I gave up and bought more RAM($70 for my stick). I'm a disabled vet, and money is tight right now thanks to the VA taking 18 months to process the average disabled veteran's paperwork. What really sucks is those suckers that built a FreeNAS server with a very low RAM limit and are already at the limit and they need more. This is why I have more RAM mentioned numerous times in my presentation. Everyone tries to argue it, but I've seen so many people argue with me, some PM me to tell me to F-Off, etc. that quite often when I see someone that has an absurdly low amount of RAM I don't even bother to respond. If they couldn't figure out their problem via the manual, my guide, and searching the forum, why should I expect they'll listen to me? They've already drowned out the answer and who likes being told what is already so plainly obvious in many places? I've seen so many threads with not enough RAM that it isn't funny.

This is where I get the most frustrated. I am here to learn first and build a good server second. The fact that I need more RAM doesn't bother me a bit. If I didn't want to spend the money, I wouldn't have ventured into a project like this. 70% of this project is educational for me and the other 30% is practical. The most likely case is that I will buy an entirely new setup when I can prove to myself I can build one of these machine, though it will probably be with a company credit card this time. Of course I want this project to have great performance because then when I'm building my next one, I'm more knowledgeable on the subject and I don't have to keep sounding like an idiot to guys like you on the internet.

5. CIFS, NFS, FTP and iSCSI don't work the same. CIFS doesn't generally see a big performance inprovemen with a ZIL. NFS and iSCSI can and often do. The whole reason why there are different protocols is that people had different ideas about what is the most important and how it works internally. Additionally, CIFS is single threaded and NFS isn't. There is no built-in support for NFS if you are using a home version of Windows. Each has pluses and minuses, and you have to weigh them. iSCSI just does "dumb reads and writes" and has no idea what a file system is or even what a file is. It just reads or writes the appropriate sectors and sends the data to the machine that needs it. So not shockingly, they don't perform the same.

Both your and jgreco's explanations of ZIL have led me to rethink my purchase of my SSD's. I am reviewing certain synchronous methods that may interest me but more than likely I will end up removing them and using them for something else.

5. I don't close topics as a matter of course. You hate my answer, fine. You want to politely tell me to screw off, fine. If you want to send me a PM and tell me how much you hate me, that's fine too. But trying to follow draconian rules where I shut people up that disagree with me doesn't do either of us any good. You may be the one with the problem, but you definitely won't learn anything if you had posted and I responded with "another idiot.. RTFM" and closed the thread. There's a reason why the US constitution includes the Freedom of Speech and why I chose to defend it. It would be a little idiotic to then deliberately silence someone else.

Good day to you. I do hope you get your performance issue figured out.


And so, thanks to the help of you guys, a few pointers and some more reading I believe I've traced down my issue and resolved it, for now at least. I spent a lot of time last night doing performance tests on the box itself, getting write speeds of around 530Mb/s, forget my read speeds but they weren't that bad. Locally I was doing tests with files 25GB large to avoid caching. I started doing network tests between my best two test boxes and my NAS server and found a very big issue. Most of the time, iperf would cap around 250Mb/s over the '1Gbe', using a 64k window sized helped a little to kick it to around 400, maybe 500 but nothing close to what it should be. This morning (got into work early for this), I moved all three machines to a new rack, didn't care about the external NICs so I stuck them in whatever switch was available, but I put a brand new managed switch between the boxes with new cable on the storage NICs and did more network testing. I'm now receiving about 930Mb/s over each line. I am finally moving the data I want on this array over to one of my CIFS shares. About 4.32TB is transferring at a steady 110-114MB/s.

The key here was a point that jgreco brought up, I had already known but didn't think anything of it and thought maybe I was bursting on the switch up to 2Gb/s. But the write speed for iSCSI was incredibly too high and never went to regular 1Gbe speeds. Turns out it was caching on the client side and slowly transferring the files over to the server. Watching the network graphs (on my old switch) while copying files, and after they were finished the storage NIC would remain around 40-50% used and the iostat of the pool showed exactly what I thought, slowly the files were writing to the disks.

I'd like to get this data onto the array and start actively using it so I can measure how well it holds up under load, however I've already ordered my RAM from Newegg and I'm picking it up from will call today after work. So thank you guys for your help, I'm sorry it was just a networking issue from the start and I should have been doing the proper tests from the beginning, but hey it's all in the learning process.
 
Status
Not open for further replies.
Top