Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions fluent-package/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -693,27 +693,20 @@ class BuildTask
puts "::group::Build jemalloc from source" if ENV["CI"]
tarball = @download_task.file_jemalloc_source
source_dir = tarball.sub(/\.tar\.bz2$/, '')
tar_options = ["--no-same-owner"]

sh(*tar_command, "xvf", tarball, "-C", DOWNLOADS_DIR)
sh(*tar_command, "xvf", tarball, "-C", DOWNLOADS_DIR, *tar_options)

configure_opts = [
"--prefix=#{install_prefix}",
"--disable-cxx"
]

if JEMALLOC_VERSION.split('.')[0].to_i >= 4
if ENV["FLUENT_PACKAGE_STAGING_PATH"] and
(ENV["FLUENT_PACKAGE_STAGING_PATH"].end_with?("el8.aarch64") or
ENV["FLUENT_PACKAGE_STAGING_PATH"].end_with?("el7.aarch64"))
# NOTE: There is a case that PAGE_SIZE detection on
# CentOS 7 CentOS 8 with aarch64 AWS ARM instance.
# So, explicitly set PAGE_SIZE by with-lg-page 16 (2^16 = 65536)
configure_opts.concat(["--with-lg-page=16"])
end
if ENV["FLUENT_PACKAGE_STAGING_PATH"] and
ENV["FLUENT_PACKAGE_STAGING_PATH"].end_with?("el8.ppc64le")
# NOTE: There is a case that PAGE_SIZE detection on
# CentOS 8 with ppc64le.
# So, explicitly set PAGE_SIZE by with-lg-page 16 (2^16 = 65536)
if ["aarch64", "ppc64le"].include?(Etc.uname[:machine])
# NOTE: Improve compatibility with kernel-64K.
# Then, explicitly set PAGE_SIZE=16 by --with-lg-page 16 (2^16 = 65536)
# Forcing PAGE_SIZE=16 to avoid "Unsuported system page size" runtime error.
configure_opts.concat(["--with-lg-page=16"])
end
Comment thread
kenhys marked this conversation as resolved.
end
Expand Down Expand Up @@ -1051,7 +1044,7 @@ class BuildTask
tarball = @download_task.file_jemalloc_source
source_dir = File.basename(tarball.sub(/\.tar\.bz2$/, ''))
license_file = File.join(source_dir, "COPYING")
tar_options = []
tar_options = ["--no-same-owner"]
tar_options << "--force-local" if windows?
sh(*tar_command, "xf", tarball, license_file, *tar_options)
mv(license_file, "LICENSE-jemalloc.txt")
Expand Down
4 changes: 2 additions & 2 deletions fluent-package/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# https://github.com/jemalloc/jemalloc/releases
# Use jemalloc 3.x to reduce memory usage
# See https://github.com/fluent-plugins-nursery/fluent-package-builder/issues/305
JEMALLOC_VERSION = "3.6.0"
#JEMALLOC_VERSION = "5.2.1"
#JEMALLOC_VERSION = "3.6.0"
JEMALLOC_VERSION = "5.3.1"

# https://www.openssl.org/source/
OPENSSL_FOR_MACOS_VERSION = "3.0.8"
Expand Down
1 change: 1 addition & 0 deletions fluent-package/templates/etc/systemd/fluentd.service.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Environment=FLUENT_CONF_INCLUDE_DIR=/etc/<%= package_dir %>/conf.d
Environment=FLUENT_PLUGIN=/etc/<%= package_dir %>/plugin
Environment=FLUENT_SOCKET=/var/run/<%= package_dir %>/<%= service_name %>.sock
Environment=FLUENT_PACKAGE_LOG_FILE=/var/log/<%= package_dir %>/<%= service_name %>.log
Environment=MALLOC_CONF="dirty_decay_ms:400,muzzy_decay_ms:0,narenas:2,background_thread:true,thp:never,abort_conf:true"
Comment thread
kenhys marked this conversation as resolved.
<% if pkg_type == 'deb' %>
EnvironmentFile=-/etc/default/<%= service_name %>
<% else %>
Expand Down
Loading