Re: Disk/Pool Layout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 27 Aug 2015, at 23:45, Robert LeBlanc <robert@xxxxxxxxxxxxx> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> On Thu, Aug 27, 2015 at 1:59 PM, Jan Schermer  wrote:
> 
> > S3500 is faster than S3700? I can compare 3700 x 3510 x 3610 tomorrow but I'd be very surprised if the S3500 had a _sustained_ throughput better than 36xx or 37xx. Were you comparing that on the same HBA and in the same way? (No offense, just curious)
> 
> None taken. I used the same box and swapped out the drives. The only difference was the S3500 has been heavily used, the 3700 was fresh from the package (if anything that should have helped the S3700).
> 
> What HBA was this?
> With my LSI 2308 some drives have issues that manifest as an "IOPS amplification" of about 5x (unfortunately btrace doesn't work too well on my kernel so not 100% sure what is happening - still investigating).
> To get the "true" speed of SSDs I either have to test them on AHCI or not use --sync=1 (direct should be sufficient - 1:1). And of course test that on a block device just as you do. I usually disable write cache also so that I get the bottom line of performance, sometimes it speeds the SSDs up actually.
> But what I see is pretty wild, still not sure what's happening.
> 
> I tested on a Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] (rev 02). I didn't do any tuning, just the defaults.
>  
> I only got the 3610 today and I got about 15K IOPS (same benchmark you do) when I started it, and it got up to 17.5K IOPS when I was leaving home. Let's see what is shows in the morning, I left it running overnight. If I remember correctly the S3700 did ~40K?
Sorry, I was testing reads :-) Writes are only 11K. Running GC probably explains why it got faster in time.
> Anyway this is still only an artifical benchmark relevant to journal-like workload, but mix that with some queued reads and varying block sizes and I bet the S3700 beats the lower models into the ground. I'm curious so I'll try finding the different performance characteristics when I get to it.
> 
> We are tying to get some 3610s in to test. I'm interested to know your results. 
> 
Exactly the same benchmark as yours
On AHCI (SATA2)
S3610 1200GB : 11000 IOPS with QD=1, 44000 with 32 jobs - this is skewed by the SATA2 on my AHCI test machine
S3700 120GB: I'll have to pull one from the cluster to refresh my memory. But I think it did 40K and up to 80K with higher number of jobs, it was much faster than anything else.
Kingston KC300: 2100 IOPS (ouch) and didn't scale with jobs
Kingston KC300 newer shitty version: 5200 IOPS and didn't scale
Samsung 845DC PRO: 14800 IOPS

I don't trust LSI and the numbers I'm getting from there. LSI+XFS/ext4/ext3+Kingston=98 IOPS in this benchmark, Intels drop down but are simply faster while Samsungs were unaffected by whatever issue is there. LSI support said my drives are not on HCL so I should go f*k myself basically.
My LSI is mpt2sas too - do you have a CentOS 6 machine somewhere that you can test on? It would be interesting to see if you have this issue as well. I don't know it it's present on CentOS 7.
Some combination of sync writes causes LSI to do something horrible to the drives that increases their latency to 5ms+, and this happens when instead of testing the raw device you test a file of the filesystem and _not_ preallocate it. 

> for i in {1..8}; do fio --filename=/dev/sda --direct=1 --sync=1 --rw=write --bs=4k --numjobs=$i --iodepth=1 --runtime=60 --time_based --group_reporting --name=journal-test; done
> 
> # jobs  IOPs   Bandwidth (KB/s)
> 
> Intel S3500 (SSDSC2BB240G4) Max 4K RW 7,500
> 1       5,617  22,468.0
> 2       8,326  33,305.0
> 3      11,575  46,301.0
> 4      13,882  55,529.0
> 5      16,254  65,020.0
> 6      17,890  71,562.0
> 7      19,438  77,752.0
> 8      20,894  83,576.0
> 
> Intel S3700 (SSDSC2BA200G3) Max 4K RW 32,000
>  1      4,417  17,670.0
>  2      5,544  22,178.0
>  3      7,337  29,352.0
>  4      9,243  36,975.0
>  5     11,189  44,759.0
>  6     13,218  52,874.0
>  7     14,801  59,207.0
>  8     16,604  66,419.0
>  9     17,671  70,685.0
> 10     18,715  74,861.0
> 11     20,079  80,318.0
> 12     20,832  83,330.0
> 13     20,571  82,288.0
> 14     23,033  92,135.0
> 15     22,169  88,679.0
> 16     22,875  91,502.0
> 
> >
> > Mons can use some space, I've experienced logging havoc, leveldb bloating havoc  (I have to compact manually or it just grows and grows), and my Mons write quite a lot at times. I guesstimate my mons can write 200GB a day, often less but often more. Maybe that's not normal. I can confirm those numbers tomorrow.
> 
> True, I haven't had the compact issues so I can't comment on that. He has a small cluster so I don't think he will get to the level you have.
> 
> I only have about 2x more OSDs than he does. A lot more space, yes, but the number of OSDs is comparable.
> I also have a lot more PGs, but that only seems to improve things so far.
> 
> As long as you have CPU for more PGs. I've found that too many PGs performs worse because you saturate your CPUs. We are currently running ~50 PGs per OSD at the moment (we are still feeling our way around the optimum performance settings).
Interesting. I haven't looked at mons closely, but OSDs use less CPU with higher number of PGs in my case and generally work happier.
>  
> >>>
> >>>   256GB RAM
> >>>
> >>>
> >>> Again - I think too much if that's the only role for those nodes, 64GB
> >>> should be plenty.
> >>
> >> Agree, if you can afford more RAM, it just means more page cache.
> >
> > But too much  page cache = bad.
> 
> I think /proc/sys/vm/min_free_kbytes help.
> Nope. Had that set all the way up to 10G with no effect.
> One scenario (I think I described it here already) is when I start a new OSD. The new OSD needs to allocate ~2GB of memory and if it isn't truly "free" then it causes all sorts of problems (peering stuck, slow ops...). Lowering min_free_kbytes or dropping caches helps because it makes the memory actually available fto the OSD and it starts right up, but that's not a nice solution.
> This is CentOS6/RHEL6 with 2.6.32 Redhat frankenkernel with backports and a lot of patches that interact in mysterious ways...
> 
> This is good info. We are on CentOS 7.1 with 4.0.x kernel. Is starting OSDs the issue you had? I'm surprised that min_free_kbytes wouldn't help in this situation. Is there something else you found with too much page cache?
I'm not sure but I think min_free_kbytes doesn't help all kinds of allocations.
Yes, the issue is starting the OSD.
It works much better with KVM - If I have 100G "pagecached" memorry and start a 64GB VM it just cleans the memory fast and starts.
If I have to start a 2GB OSD it struggles to get the memory and lags horribly.
I think the main difference is that KVM allocates the whole amount of memory at once and kernel cleans that in one sweep, while OSD allocates small blocks (small order allocs) so even if it got its' memory from the min_free_kbytes pool it would have to wait for kswapd to punch the hole every time this memory drops down. Btw disabling tcmalloc helped in this case, something's rotten in here...


> 
> > True for the 120GB drives. You only really need something like 1-10GB at most.
> > I'd still get a smaller higher-class drive and just not touch provisioning, if only for the sake of warranty. But I think it's easier to just skip dedicated journal drives in this case.
> 
> I think I remember someone saying that journals on separate SSDs gave them better performance than journals co-located on the SSD, I don't remember though. If warranty replacement is your primary concern, then go with the 3700. If they already have the 3500, they can get it to perform/endure like the 3700 with the only cost is disk space.
> Yeah. It's true the 3500s will likely survive a few years and then the cost for something like 37xx will be much lower. 
> 
> The issue with journals on the same _filesystem_ is that a fsync of the journal causes all the dirty data to be flushed out, you should have a separate partition so that it doesn't interact (except in drive and its cache, a non-issue with Intels)
> On the other hand, if you have journal as a file on filesystem you can disable barriers and get much higher throughput, while disabling flushes on a block device is hard or impossible (there's a very obscure option of echoing "temporary write through" to the scsi_disk/cache_type sysfs node, but that's not available on Ubuntu for example).
> 
> I agree about the separate partition, maybe it was a problem with the SSD cache I don't remember the specifics. Your suggestion on disabling barriers peaked my interest. Initially we had barriers disabled, but since we don't have battery backed controllers we backed that setting out. Are you suggesting disabling barriers in all cases? I'd like to discuss the pros/cons of this option.
Just for the record - barriers don't really exist anymore, they were replaced by FUA and explicit flushes (though the effect should be the same).

You can disable barriers:
1) if your drives or controllers have non-volatile cache
2) if your filesystem is crash consistent without them (journal checkpoints, replays - ext4+journal_async_commit/journal_checksum might do it but I spent some time reading through LKML and get the feeling this is guesswork and wishful thinking on the devs part)
3) if you are 10000% sure all your nodes will not crash all at once. We have 3 datacenters few kms apart with one replica in each, in this case I could disable barriers safely. Care must be taken when the node crashes and you start it again - the filesystem might be corrupted even though the system thinks it's clean.

Even with barriers there are some drives (consumer SATA drivers and some SSDs) that will not actually flush the data even though they don't have a capacitor. Having those drives in the cluster is a gamble and you should disable write cache on them - sometimes that also doesn't work...

In my case with Kingstons, I can either have them perform at 98 IOPS bottom line (but observed with real workload!!!) or disable barriers and then they perform ~3K IOPS. I only do that now when recovering and only on one node at a time. Hopefully I'll be Kingston-free in two weeks and can sleep well again.

TL;DR: If you have drives that work well enough with barriers enabled, don't disable them. Even with barriers enabled some assumptions the filesystems make are incorrect - for example the writes are not guaranteed to be atomic and are reordered. The only real solution is using filesystem with checksums like ZFS and more replicas or you will lose data to bad behaving caches or bit-rot.

Jan



_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux