News for hackers. Stuff that matters.
Re:AMD EPYC Performance Testing with systemd by et2o on Thursday July 12, 2018 @04:46PM (#17518449)
This is perhaps tangential to the article, but what is the advantage of running the MySQL server with more than 48 threads on a 24-core, 48 thread CPU anyway?

The fact that performance is in the EPYC cpu increasing on the older 4.13 kernel when you use 100 instead of 40 threads is surprising to me. On the Epyc (Kernel 4.15 | Ubuntu 18) and and Xeon CPU you can see it stalls or decreases from ~48 threads upwards.

Re:AMD EPYC Performance Testing with systemd by evanelias on Thursday July 12, 2018 @05:19PM (#17518700)
The thread count in these graphs is typically on the client side -- it's the number of concurrent client threads (connections) coming from the benchmark. So with more client threads than CPU cores/HT threads, the benchmark can show the results of increasing the amount of CPU contention/saturation.

On the server side, MySQL defaults to using a model of 1 thread per connection, plus various additional background threads for I/O, listening for new conns, replication, signal handling, purging old row versions, etc. Most of these are configurable, but it's not as simple as "running the MySQL server with N threads". Basically, if the benchmark is using N threads on the client side, then you can assume the server actually has N + M threads, as the server-side thread count is dynamic based on the workload.

Re:AMD EPYC Performance Testing with systemd by et2o on Thursday July 12, 2018 @08:25PM (#17519691)
Ah, this is the answer that makes the most sense. Thank you.
Re:AMD EPYC Performance Testing with systemd by Alupis on Thursday July 12, 2018 @04:49PM (#17518467)
I would assume it's because not every thread may be busy at the same time - some may be waiting for I/O, or simple keep-alive threads that only need to do things once in a while.
Re:AMD EPYC Performance Testing with systemd by igor47 on Thursday July 12, 2018 @04:50PM (#17518479)
running more threads than CPUs is useful whenever your workload is not 100% CPU-bound. a DB workload is likely IO-bound, so many threads will just be sittin' there waiting to be woken up a lot of the time
Re:AMD EPYC Performance Testing with systemd by blattimwind on Thursday July 12, 2018 @04:54PM (#17518509)
> no IO is performed
Re:AMD EPYC Performance Testing with systemd by Cyphus on Thursday July 12, 2018 @05:04PM (#17518600)
A DB that performs no IO? Can you elaborate?
Re:AMD EPYC Performance Testing with systemd by duckerude on Thursday July 12, 2018 @05:10PM (#17518647)
Referring to this sentence, I think:

>To test CPU performance, I used a read-only in-memory sysbench OLTP benchmark, as it burns CPU cycles and no IO is performed by Percona Server.

Re:AMD EPYC Performance Testing with systemd by stingraycharles on Thursday July 12, 2018 @05:09PM (#17518637)
Usually that means a read-heavy workload where things fit in RAM.
Re:AMD EPYC Performance Testing with systemd by blattimwind on Thursday July 12, 2018 @05:45PM (#17518889)
That's a literal quote from the article. The benchmark was done entirely done in-memory.
Re:AMD EPYC Performance Testing with systemd by imtringued on Thursday July 12, 2018 @06:30PM (#17519157)
There is no such thing as no I/O.

If you're latency bound by the round trip to main memory then SMT will still have a noticeable benefit. The most important thing it can't help with is if you are compute bound.

Re:AMD EPYC Performance Testing with systemd by BeeOnRope on Thursday July 12, 2018 @09:31PM (#17519916)
Nobody calls "trips to memory" I/O though. Yes SMT can have a benefit but the OP was asking about the case with more threads than logical cores, so SMT is already maxed out (assuming all threads are CPU bound).
Re:AMD EPYC Performance Testing with systemd by rbanffy on Friday July 13, 2018 @08:36AM (#17522379)
> SMT will still have a noticeable benefit

YMMV. SMT usually halves the cache size usable by each thread. If your memory access is heavily local, enabling SMT can hurt your performance.

Re:AMD EPYC Performance Testing with systemd by Filligree on Thursday July 12, 2018 @04:57PM (#17518530)
Given it depends on the kernel version, I would imagine some kind of platform-specific tuning. Epyc is a NUMA platform, so perhaps improvements to the NUMA scheduler?

That's pure guesswork, though.

Re:AMD EPYC Performance Testing with systemd by Kenji on Thursday July 12, 2018 @04:56PM (#17518525)
Caching effects. If you have an x-thread CPU and you split your workload into y >> x parts, it might happen that suddenly a workload fits into a faster CPU cache level (e.g. L1 instead of L2) and then you see huge speedups. I've seen things speed up manifold when I had 67 threads and added one more even though it was an 8-thread CPU. Keep that in mind when you do threading.