https://bugs.kde.org/show_bug.cgi?id=396171

            Bug ID: 396171
           Summary: CPU related brush performance issues on many mid to
                    low-end mobile CPUs
           Product: krita
           Version: 4.1.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Brush engines
          Assignee: krita-bugs-n...@kde.org
          Reporter: tyson...@mail.com
  Target Milestone: ---

Recently I have been testing mid to low-end laptops and all-in-ones for using
with Krita in budget-sensitive scenarios. These computers range roughly from
$229 to $529. From these tests, I discovered that Krita’s brush system is very
selective when it comes to mobile and SoC CPUs. There were huge CPU related
slowdowns towards some particular hardware/software settings, while the the CPU
can be rather strong but still performed poorly in some cases.



### TEST ################

Fresh Windows 10 with latest drivers and patches installed (well, mostly).
Manjaro KDE 17.1.11 Live USB (Linux 4.14)
Krita 4.1.0 / A4 300 dpi 8 bit / Basic-5_size, Basic-6_detail, Air_brush_soft,
Distort_move
Stablizer OFF, Brush Smoothing: None / Basic
When slowdown happened, test again with GPU acceleration OFF.
Wacom Intuos S (Generation 3, CTL-4100)




### RESULT ################

### Keys that triggered slowdowns
1) Basic-6_detail brush preset (slow drawing, or fast drawing with dropped
tablet signals)
2) Windows 10 + CPUs before Skylake (6th gen)
3) CPUs with poor single-thread performance

### Good CPUs (Windows and Linux): 
Celeron 3865U (4GB) / N4000 (4GB) / Core m3-6Y30 (4GB) / Core i3-3240 (4GB) /
Core i5-7200U (8GB) / Core i5-8250U (8GB)

### Good CPUs (Linux only): 
Core i3-4010U (4GB) / Core i7-3520M (16GB) 

### BAD:
Intel Celeron N3150M (16GB) / N3450 (4GB)
AMD A4-7220 (4GB) / A6-9210 (4GB) / A9-9420 (4GB) / A10-9600P (4GB) / A12-9700P
(8GB)



### ANALYZE ################

### The Role of GPU
Turning ON and OFF GPU acceleration have no effect to any slowdowns happened in
this test. 

###  Basic-6_detail
This particular preset can slow down lowend CPUs badly. I never changed its
size during the tests. David Reevoy suspects: 0.02 spacing and precision to 5,
plus Fan corner parameter being resource heavy. It needs at least Core m3-6Y30
to perform nicely.

### Core i7-3520M (Mobile) and  Core i3-3240 (Desktop)
They are the same 3rd Generation of Intel Core I family CPUs. Both have 2 cores
and 4 threads. They support the same instructions. On spec, i7-3520M is better
in every way, it has 1.3 times larger L3 cache and a 4 times larger GPU scale.
There is only one exception: i3-3240 has a base clock of 3.40 Ghz, while
i7-3520M has 2.90 Ghz. However, the latter can burst to 3.60 Ghz. On benchmark,
Core i3-3240 has marginal better single thread performance (1810 vs 1782).
Under Windows 10, the weaker Core i3-3240 handled Krita very well, while the
supposedly stronger Core i7-3520M with 4 times larger RAM lagged badly. When it
came to Linux, they both performed very well. 

In this case, I suspect Windows 10’s way of handling multi-thread CPU workload.
I also suspect the effects from Intel’s Hyper-threading bug / Meltdown /
Spectre patches. The Core i7-3520M resides in a Thinkpad X230T, it has
Hyper-threading / Meltdown / Spectre patched in its BIOS. The Core i3-3240
resides in a budget all-in-one PC, it never received any related BIOS update.

### Core i3-4010U
This CPU performed poorly under Windows, but performed rather well under Linux.
Its Windows performance is slightly better than i7-3520M. It has no right to
though, since it has a much lower clock speed (1.70 Ghz) and it has no burst
capability. On benchmark, these CPUs’ single-thread ratings are: (i3-4010U:932
/ i7-3520M:1782)

In this case, I suspect Windows 10’s CPU driver was optimized towards 3rd gen
and 4th gen Intel Core CPUs differently.

### Celeron 3865U and N4000
These two CPUs both have 2 cores and 2 threads, with a base clock of 1.10 Ghz.
They have no hyper-threading or burst capabilities. They performed well under
Windows in general. I didn’t test them under Linux but I expect them to do well
too. 

When handling the brush preset “Basic-6_detail”, they could draw the line in a
timely fashion. However, if the strokes were long and quick, big chunks of
tablet signals were dropped, resulted in lines that similar to what happened on
MacOSX in the past.

### Intel Celeron N3150M and N3450
These two CPUs both have 4 cores and 4 threads. N3150M has a base clock of
1.60Ghz and it can burst to 2.08Ghz. N3450 has a base clock of 1.10 Ghz and it
can burst to 2.20 Ghz. They both suffered huge slowdowns under Windows and
Linux. They have no rights to though, because compared to the fore-mentioned
Celeron 3865U and N4000, they have 2 times more cores and 2 times faster clock.

In this case, I suspect Krita’s single thread performance sensitivity. Although
N3150M and N3450 have 2 times more cores and 2 times faster clock speeds
compared to 3865U and N4000, the 3865U is a tick-tock newer, while N4000 is a
tick-tock-tick newer. On benchmark, these CPUs’ single-thread ratings were:
(N3150M:471 / N3450:727 / 3865U:1030 / N4000:1123). Maybe the newer 3865U and
N4000 also match Krita’s optimization better than the older CPUs.



### AMD A4-7220 / A6-9210 / A9-9420 / A10-9600P / A12-9700P
The whole family of AMD’s APU performed rather poorly with brush preset
“Basic-6_detail”, regardless of Windows or Linux. Otherwise they were still
usable, performed slightly slower than 3865U. The frequent slowdowns made me
hate drawing with them though.

In this case, I suspect Krita’s single thread performance sensitivity. On
benchmark, these CPUs’ single-thread ratings were (A4:832 / A6:1193 / A9:1403 /
A10:1300 / A12:1315). On paper, they had no right to perform this badly. But
when you take Krita’s optimization into consideration, plus David Reevoy’s
suspect of Vc library on this matter, it’s possible that it has 25% negative
impact on AMD CPUs’ performance in general.



### CONCLUSION ################
It should be safe to suggest a few bottom lines for CPUs for Krita:
SoC: Celeron N4000 or better.
Normal: Core m3-6Y30 or better.
Desktop: Celeron G1620 or better.

Ideally: Intel Core i5-8250U / AMD Ryzen 5 2500U. 
You can find laptops with one of these two CPUs installed at the price range of
$399 to $529. They are 2 times faster than the ones before them, and usually
pair with 8GB of RAM. They are much better choices for Krita’s tasks.

I hope we can also improve Krita's performance against the slowdowns I reported
here. I encountered many artists that must use Krita on older, weaker,
less-than-ideal laptops.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to