[MDEV-6533] MySQL Bug#72718 - CACHE_LINE_SIZE in innodb should be 128 on POWER Created: 2014-08-05  Updated: 2016-04-01  Resolved: 2014-10-03

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Storage Engine - XtraDB
Fix Version/s: 10.0.15

Type: Task Priority: Major
Reporter: Sergey Vojtovich Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-6530 Examine and apply Power8 patches sugg... Closed
Relates
relates to MDEV-9857 CACHE_LINE_SIZE in innodb should be 1... Closed

 Description   

The following patch is suggested by Stewart Smith:

Define CACHE_LINE_SIZE in ut0counter.h to 128 on POWER
 
Index: mysql-5.6.17/storage/innobase/include/ut0counter.h
===================================================================
--- mysql-5.6.17.orig/storage/innobase/include/ut0counter.h
+++ mysql-5.6.17/storage/innobase/include/ut0counter.h
@@ -32,7 +32,11 @@ Created 2012/04/12 by Sunny Bains
 #include "os0thread.h"
 
 /** CPU cache line size */
+#ifdef __powerpc__
+#define CACHE_LINE_SIZE                128
+#else
 #define CACHE_LINE_SIZE                64
+#endif
 
 /** Default number of slots to use in ib_counter_t */
 #define IB_N_SLOTS             64



 Comments   
Comment by Sergey Vojtovich [ 2014-08-05 ]

We need to double check proper way of determining CPU cache line size. Plus XtraDB had one more source file with CACHE_LINE_SIZE definition/

Comment by Michael Widenius [ 2014-08-05 ]

ok to push for now
Just add to the comment that the change was suggested by stewart smith.

Comment by Michael Widenius [ 2014-08-05 ]

ok to push after comment change

Comment by Sergey Vojtovich [ 2014-08-28 ]

Adjusting cache line size is the right thing in theory. But in practice we didn't see any noteworthy throughput increase with this patch. We'll get back to this patch when we have proof that smaller cache line size negatively affects performance.

Comment by Sergey Vojtovich [ 2014-10-03 ]

Axel reported that this patch gives ~5% throughput increase @ 20cores.

Comment by Sergey Vojtovich [ 2014-10-03 ]

revno: 4427
revision-id: svoj@mariadb.org-20141003133846-h7cjr7mbk653q450
parent: bar@mnogosearch.org-20141002114820-2jqqgtje33dx4679
committer: Sergey Vojtovich <svoj@mariadb.org>
branch nick: 10.0-mdev6533
timestamp: Fri 2014-10-03 17:38:46 +0400
message:
  MDEV-6533 - MySQL Bug#72718 - CACHE_LINE_SIZE in innodb should be 128 on POWER
 
  This patch is suggested by Stewart Smith.
  Define CACHE_LINE_SIZE to 128 on POWER.

Comment by Daniel Black [ 2016-01-12 ]

similar: https://github.com/mysql/mysql-server/pull/37 for aarch64 too

Generated at Thu Feb 08 07:12:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.