Skip to content

Commit 4258885

Browse files
ram1048dahlerlend
authored andcommitted
Bug#38005202 Server_memory ignored [1/2]
Description: The default values of some configurations are auto-tuned based on the total physical memory available to the server. WL#16938 introduced the startup option server_memory to allow the user to configure the amount of memory to be considered when auto-tuning the defaults. These APIs are exposed to the server code using the library_mysys component. Issue: Due to the design of the library_mysys component, the APIs were exposed as STATIC library. Thus, components which link library_mysys bring their own copy of the APIs. These copies are not confiugred based on the value of server_memory. This leads to server_memory configuration being ignored and total_physical_memory() being returned instead. Fix: During initialization of these components, read the system variable server_memory. Then configure the APIs based on the value read. At any point if there is failure, throw a warning about the failure and fall back to the total physical memory available. Change-Id: I5550bc14bcc424a95b10fec58c0968a39e949584
1 parent 954d9e3 commit 4258885

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

share/messages_to_error_log.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13161,6 +13161,9 @@ ER_AUDIT_LOG_OFFLOAD_WARNING
1316113161
ER_AUDIT_LOG_OFFLOAD_ERROR
1316213162
eng "%s"
1316313163

13164+
ER_WARN_SERVER_MEMORY_INIT_FAIL
13165+
eng "Failed to read or validate server_memory, and falling back to total physical memory."
13166+
1316413167
################################################################################
1316513168
# Error numbers 50000 to 51999 are reserved. Please do not use them for
1316613169
# other error messages.

0 commit comments

Comments
 (0)