Increasing SCALE ARC size

probain

Patron
Joined
Feb 25, 2023
Messages
211
Your ticket shows using the postinit method. You have to reboot after applying that method and you also must select postinit as when to run so it runs after boot but before the services start.
I asked the question because Tom Lawrence posted a video recently about doing the change using the method I posted and wanted to ask Kris Moore if the cli method and the postinit method would work the same as I suspected it would.
Have you tried the cli method Kris posted?
# cli
# system advanced update kernel_extra_options="zfs_arc_max=<SIZE IN BYTES>"

For example:



To clear and go back to the defaults:



With both methods you need to reboot after changing the arc_max value for the system to read the new value. The setting is applied at a certain point in the boot process, changing it after that point will not have an effect until next reboot.

When I apply the setting I use for my system, I go from about 62GB (50%) for cache before applying the new value, to 82GB cache which is what I set my value to, after reboot.

I also noticed you are setting to 90GB which is less than 50% of your 256GB You can do that but still need to reboot.
I think you're confusing me and Sawtaytoes. I spec in the ticket, and in my posts signature that I have 128GB RAM.

I am aware that the "postinit" method as you call it "works". Although I use it with Cron, due to it being reset when VM's turn to an off state.

But I wasn't aware that a reboot would be necessary for the kernel options to be applied. I will try this later tonight, when I'm back home. Although it was stated by Honeybadger that adjusting zfs_arc_max could be done dynamically. And I then assumed he was regering to the kernel options method.

Edit/update:
You might not actually mean my post. But since you said "your ticket", and I'm the only one filling one. I assumed it was directed to me
 
Last edited:

PhilD13

Patron
Joined
Sep 18, 2020
Messages
203
Sorry, my fault. It had gotten a bit confusing and I should have looked closer at names. Off of the original post Kris made I mainly just asked if what I followed (Tom L's method) was/would work the same as the cli method. Looks like the ARC issue is a work in progress in the way ZFS handles memory under Linux, not so much a Truenas one. The reason for the 50% limit in the first place is it is a workaround as it discovered in reality that certain conditions would allow ARC to exceed physical system memory.

The commits and merged changes pages below are good reads in explaining the issues.
From OPenZFS: Commits 518b487 and 23bdb07 changed the default ARC size limit on Linux systems to 1/2 of physical memory, which has become too strict for modern systems with large amounts of RAM. This patch changes the default limit to match that of FreeBSD, so ZFS may have a unified value on both platforms.

Comment: One particular scenario on Linux where increasing this limit has been a problem is with libvirt managed VMs. My recollection is this can be an issue because the ARC memory is not reported as part of the page cache so it appears to be allocated to libvirt. This will cause libvirt to not even try and start the VM even though the memory is reclaimable. That said, things may be different these days.

You can read more here: merged changes.
So the issue you describe may already be known in some form or fashion.

I was taught that after any changes involving configuration settings on anything computerized, you should always reboot the device to make sure anything changed was properly saved, is read into memory, and the system can survive a reboot successfully. With services (like SMB) you don't need a reboot but the service should be stopped and restarted to make sure the changes are read and take effect properly.
 

probain

Patron
Joined
Feb 25, 2023
Messages
211
Your ticket shows using the postinit method. You have to reboot after applying that method and you also must select postinit as when to run so it runs after boot but before the services start.
Did you happen to read my ticket in its entirety, and the steps described? In there I listed every option I tried. And how they (seem to) influence each other.

I've now also tried a reboot after first setting the /sys/module/zfs/parameters/zfs_arc_max back to it's default 0.
kernel_extra_options was left at the desired 96636764160.
ARC still doesn't grow over 50%.
Conclusion: kernel_extra_options on its own, does not work as "advertised" (for me).

@PhilD13, I would gladly see if you could validate or contradict my findings by testing you too. :smile:
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
Shouldn't the value for zfs_arc_max displayed in arc_summary also change to the set value?
Because after using it, my value still stays at 0 which i believe is the default value for scale.
 

PhilD13

Patron
Joined
Sep 18, 2020
Messages
203
Shouldn't the value for zfs_arc_max displayed in arc_summary also change to the set value?
Because after using it, my value still stays at 0 which i believe is the default value for scale.
Yes. Mine went from 62 to 82 as you can see below [Edit: I should say I changed the value from 62TB which is the default value on my system (50% of 128GB memory) for ARC and changed the value to the byte equivalent of 82TB. When done with the change I rebooted the server for it to take effect. I do not know and did not care at the time what the original value internally was. You can guess that it is the byte value of 62TB and be close. The method I took (making it a command to run postinit from system > advanced menu). As the command is altering a value but not permanently changing it, I can simply remove or disable the command and all is back to default after a reboot The command I used (128GB total ram) is:
echo 88046829568 >> /sys/module/zfs/parameters/zfs_arc_max
and is shown below.

I'm not so sure the max default is 0 as the correct cli command to remove the setting is:
# system advanced update kernel_extra_options=""
I think setting it to zfs_arc_max=0 is setting the max value of ARC to 0 which would make it well, 0 while setting it to "" empties the value without setting it to anything and that lets the system determine what the value is to be.

The "" in the to remove the value Kris posted is not actually a 0 or NULL but and empty string value.
In the original cli command Kris posted (# system advanced update kernel_extra_options="zfs_arc_max=<SIZE IN BYTES>") that the zfs_arc_max=<SIZE IN BYTES> section of the command is in double quotes. That normally means it is a string value to be applied to a variable and Linux likes text configs.

This adjustment to my systems ARC was done on a new setup during testing before being released for production. It worked fine in testing for the intended purpose of the server and is rock solid in production. The server has now been in production for a couple weeks, and the one it replaced (QNAP) is now out of service so I'm not willing to play much with settings, do reboots, apply new releases right away, etc. on it for the sake of playing with it as that is not good policy. ]
 

Attachments

  • ARC Size 2023-10-29 084001.png
    ARC Size 2023-10-29 084001.png
    142.6 KB · Views: 141
  • command to run 2023-10-29 100910.png
    command to run 2023-10-29 100910.png
    318.5 KB · Views: 134
Last edited:

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
I'm not talking about the reporting tab.
If i ssh into my truenas box and run arc_summary and take a look at the Tunables the only values that changed to the value i set were
zfs_dirty_data_max and zfs_dirty_data_max_max. The value for zfs_arc_max stayed at 0.
Code:
Tunables:
        dbuf_cache_hiwater_pct                                        10
        dbuf_cache_lowater_pct                                        10
        dbuf_cache_max_bytes                        18446744073709551615
        dbuf_cache_shift                                               5
        dbuf_metadata_cache_max_bytes               18446744073709551615
        dbuf_metadata_cache_shift                                      6
        dbuf_mutex_cache_shift                                         0
        ddt_zap_default_bs                                            15
        ddt_zap_default_ibs                                           15
        dmu_object_alloc_chunk_shift                                   7
        dmu_prefetch_max                                       134217728
        icp_aes_impl                cycle [fastest] generic x86_64 aesni
        icp_gcm_avx_chunk_size                                     32736
        icp_gcm_impl               cycle [fastest] avx generic pclmulqdq
        ignore_hole_birth                                              1
        l2arc_exclude_special                                          0
        l2arc_feed_again                                               1
        l2arc_feed_min_ms                                            200
        l2arc_feed_secs                                                1
        l2arc_headroom                                                 2
        l2arc_headroom_boost                                         200
        l2arc_meta_percent                                            33
        l2arc_mfuonly                                                  0
        l2arc_noprefetch                                               1
        l2arc_norw                                                     0
        l2arc_rebuild_blocks_min_l2size                       1073741824
        l2arc_rebuild_enabled                                          1
        l2arc_trim_ahead                                               0
        l2arc_write_boost                                        8388608
        l2arc_write_max                                          8388608
        metaslab_aliquot                                         1048576
        metaslab_bias_enabled                                          1
        metaslab_debug_load                                            0
        metaslab_debug_unload                                          0
        metaslab_df_max_search                                  16777216
        metaslab_df_use_largest_segment                                0
        metaslab_force_ganging                                  16777217
        metaslab_force_ganging_pct                                     3
        metaslab_fragmentation_factor_enabled                          1
        metaslab_lba_weighting_enabled                                 1
        metaslab_preload_enabled                                       1
        metaslab_unload_delay                                         32
        metaslab_unload_delay_ms                                  600000
        send_holes_without_birth_time                                  1
        spa_asize_inflation                                           24
        spa_config_path                             /etc/zfs/zpool.cache
        spa_load_print_vdev_tree                                       0
        spa_load_verify_data                                           1
        spa_load_verify_metadata                                       1
        spa_load_verify_shift                                          4
        spa_slop_shift                                                 5
        spa_upgrade_errlog_limit                                       0
        vdev_file_logical_ashift                                       9
        vdev_file_physical_ashift                                      9
        vdev_removal_max_span                                      32768
        vdev_validate_skip                                             0
        zap_iterate_prefetch                                           1
        zap_micro_max_size                                        131072
        zfetch_max_distance                                     67108864
        zfetch_max_idistance                                    67108864
        zfetch_max_sec_reap                                            2
        zfetch_max_streams                                             8
        zfetch_min_distance                                      4194304
        zfetch_min_sec_reap                                            1
        zfs_abd_scatter_enabled                                        1
        zfs_abd_scatter_max_order                                     13
        zfs_abd_scatter_min_size                                    1536
        zfs_admin_snapshot                                             0
        zfs_allow_redacted_dataset_mount                               0
        zfs_arc_average_blocksize                                   8192
        zfs_arc_dnode_limit                                            0
        zfs_arc_dnode_limit_percent                                   10
        zfs_arc_dnode_reduce_percent                                  10
        zfs_arc_evict_batch_limit                                     10
        zfs_arc_eviction_pct                                         200
        zfs_arc_grow_retry                                             0
        zfs_arc_lotsfree_percent                                      10
        zfs_arc_max                                                    0
        zfs_arc_meta_balance                                         500
        zfs_arc_min                                                    0
        zfs_arc_min_prefetch_ms                                        0
        zfs_arc_min_prescient_prefetch_ms                              0
        zfs_arc_pc_percent                                             0
        zfs_arc_prune_task_threads                                     1
        zfs_arc_shrink_shift                                           0
        zfs_arc_shrinker_limit                                     10000
        zfs_arc_sys_free                                               0
        zfs_async_block_max_blocks                  18446744073709551615
        zfs_autoimport_disable                                         1
        zfs_blake3_impl          cycle [fastest] generic sse2 sse41 avx2
        zfs_brt_prefetch                                               1
        zfs_btree_verify_intensity                                     0
        zfs_checksum_events_per_second                                20
        zfs_commit_timeout_pct                                         5
        zfs_compressed_arc_enabled                                     1
        zfs_condense_indirect_commit_entry_delay_ms                    0
        zfs_condense_indirect_obsolete_pct                            25
        zfs_condense_indirect_vdevs_enable                             1
        zfs_condense_max_obsolete_bytes                       1073741824
        zfs_condense_min_mapping_bytes                            131072
        zfs_dbgmsg_enable                                              1
        zfs_dbgmsg_maxsize                                       4194304
        zfs_dbuf_state_index                                           0
        zfs_ddt_data_is_special                                        1
        zfs_deadman_checktime_ms                                   60000
        zfs_deadman_enabled                                            1
        zfs_deadman_failmode                                        wait
        zfs_deadman_synctime_ms                                   600000
        zfs_deadman_ziotime_ms                                    300000
        zfs_dedup_prefetch                                             0
        zfs_default_bs                                                 9
        zfs_default_ibs                                               15
        zfs_delay_min_dirty_percent                                   60
        zfs_delay_scale                                           500000
        zfs_delete_blocks                                          20480
        zfs_dirty_data_max                                    4294967296
        zfs_dirty_data_max_max                                4294967296
        zfs_dirty_data_max_max_percent                                25
        zfs_dirty_data_max_percent                                    10
        zfs_dirty_data_sync_percent                                   20
        zfs_disable_ivset_guid_check                                   0
        zfs_dmu_offset_next_sync                                       1
        zfs_embedded_slog_min_ms                                      64
        zfs_expire_snapshot                                          300
        zfs_fallocate_reserve_percent                                110
        zfs_flags                                                      0
        zfs_fletcher_4_impl [fastest] scalar superscalar superscalar4 sse2 ssse3 avx2
        zfs_free_bpobj_enabled                                         1
        zfs_free_leak_on_eio                                           0
        zfs_free_min_time_ms                                        1000
        zfs_history_output_max                                   1048576
        zfs_immediate_write_sz                                     32768
        zfs_initialize_chunk_size                                1048576
        zfs_initialize_value                        16045690984833335022
        zfs_keep_log_spacemaps_at_export                               0
        zfs_key_max_salt_uses                                  400000000
        zfs_livelist_condense_new_alloc                                0
        zfs_livelist_condense_sync_cancel                              0
        zfs_livelist_condense_sync_pause                               0
        zfs_livelist_condense_zthr_cancel                              0
        zfs_livelist_condense_zthr_pause                               0
        zfs_livelist_max_entries                                  500000
        zfs_livelist_min_percent_shared                               75
        zfs_lua_max_instrlimit                                 100000000
        zfs_lua_max_memlimit                                   104857600
        zfs_max_async_dedup_frees                                 100000
        zfs_max_dataset_nesting                                       50
        zfs_max_log_walking                                            5
        zfs_max_logsm_summary_length                                  10
        zfs_max_missing_tvds                                           0
        zfs_max_nvlist_src_size                                        0
        zfs_max_recordsize                                      16777216
        zfs_metaslab_find_max_tries                                  100
        zfs_metaslab_fragmentation_threshold                          70
        zfs_metaslab_max_size_cache_sec                             3600
        zfs_metaslab_mem_limit                                        25
        zfs_metaslab_segment_weight_enabled                            1
        zfs_metaslab_switch_threshold                                  2
        zfs_metaslab_try_hard_before_gang                              0
        zfs_mg_fragmentation_threshold                                95
        zfs_mg_noalloc_threshold                                       0
        zfs_min_metaslabs_to_flush                                     1
        zfs_multihost_fail_intervals                                  10
        zfs_multihost_history                                          0
        zfs_multihost_import_intervals                                20
        zfs_multihost_interval                                      1000
        zfs_multilist_num_sublists                                     0
        zfs_no_scrub_io                                                0
        zfs_no_scrub_prefetch                                          0
        zfs_nocacheflush                                               0
        zfs_nopwrite_enabled                                           1
        zfs_object_mutex_size                                         64
        zfs_obsolete_min_time_ms                                     500
        zfs_override_estimate_recordsize                               0
        zfs_pd_bytes_max                                        52428800
        zfs_per_txg_dirty_frees_percent                               30
        zfs_prefetch_disable                                           0
        zfs_read_history                                               0
        zfs_read_history_hits                                          0
        zfs_rebuild_max_segment                                  1048576
        zfs_rebuild_scrub_enabled                                      1
        zfs_rebuild_vdev_limit                                  67108864
        zfs_reconstruct_indirect_combinations_max                   4096
        zfs_recover                                                    0
        zfs_recv_best_effort_corrective                                0
        zfs_recv_queue_ff                                             20
        zfs_recv_queue_length                                   16777216
        zfs_recv_write_batch_size                                1048576
        zfs_removal_ignore_errors                                      0
        zfs_removal_suspend_progress                                   0
        zfs_remove_max_segment                                  16777216
        zfs_resilver_disable_defer                                     0
        zfs_resilver_min_time_ms                                    3000
        zfs_scan_blkstats                                              0
        zfs_scan_checkpoint_intval                                  7200
        zfs_scan_fill_weight                                           3
        zfs_scan_ignore_errors                                         0
        zfs_scan_issue_strategy                                        0
        zfs_scan_legacy                                                0
        zfs_scan_max_ext_gap                                     2097152
        zfs_scan_mem_lim_fact                                         20
        zfs_scan_mem_lim_soft_fact                                    20
        zfs_scan_report_txgs                                           0
        zfs_scan_strict_mem_lim                                        0
        zfs_scan_suspend_progress                                      0
        zfs_scan_vdev_limit                                     16777216
        zfs_scrub_error_blocks_per_txg                              4096
        zfs_scrub_min_time_ms                                       1000
        zfs_send_corrupt_data                                          0
        zfs_send_no_prefetch_queue_ff                                 20
        zfs_send_no_prefetch_queue_length                        1048576
        zfs_send_queue_ff                                             20
        zfs_send_queue_length                                   16777216
        zfs_send_unmodified_spill_blocks                               1
        zfs_sha256_impl cycle [fastest] generic x64 ssse3 avx avx2 shani
        zfs_sha512_impl             cycle [fastest] generic x64 avx avx2
        zfs_slow_io_events_per_second                                 20
        zfs_snapshot_history_enabled                                   1
        zfs_spa_discard_memory_limit                            16777216
        zfs_special_class_metadata_reserve_pct                        25
        zfs_sync_pass_deferred_free                                    2
        zfs_sync_pass_dont_compress                                    8
        zfs_sync_pass_rewrite                                          2
        zfs_sync_taskq_batch_pct                                      75
        zfs_traverse_indirect_prefetch_limit                          32
        zfs_trim_extent_bytes_max                              134217728
        zfs_trim_extent_bytes_min                                  32768
        zfs_trim_metaslab_skip                                         0
        zfs_trim_queue_limit                                          10
        zfs_trim_txg_batch                                            32
        zfs_txg_history                                              100
        zfs_txg_timeout                                                5
        zfs_unflushed_log_block_max                               131072
        zfs_unflushed_log_block_min                                 1000
        zfs_unflushed_log_block_pct                                  400
        zfs_unflushed_log_txg_max                                   1000
        zfs_unflushed_max_mem_amt                             1073741824
        zfs_unflushed_max_mem_ppm                                   1000
        zfs_unlink_suspend_progress                                    0
        zfs_user_indirect_is_special                                   1
        zfs_vdev_aggregation_limit                               1048576
        zfs_vdev_aggregation_limit_non_rotating                   131072
        zfs_vdev_async_read_max_active                                 3
        zfs_vdev_async_read_min_active                                 1
        zfs_vdev_async_write_active_max_dirty_percent                 60
        zfs_vdev_async_write_active_min_dirty_percent                 30
        zfs_vdev_async_write_max_active                               10
        zfs_vdev_async_write_min_active                                2
        zfs_vdev_def_queue_depth                                      32
        zfs_vdev_default_ms_count                                    200
        zfs_vdev_default_ms_shift                                     29
        zfs_vdev_failfast_mask                                         1
        zfs_vdev_initializing_max_active                               1
        zfs_vdev_initializing_min_active                               1
        zfs_vdev_max_active                                         1000
        zfs_vdev_max_auto_ashift                                      14
        zfs_vdev_max_ms_shift                                         34
        zfs_vdev_min_auto_ashift                                       9
        zfs_vdev_min_ms_count                                         16
        zfs_vdev_mirror_non_rotating_inc                               0
        zfs_vdev_mirror_non_rotating_seek_inc                          1
        zfs_vdev_mirror_rotating_inc                                   0
        zfs_vdev_mirror_rotating_seek_inc                              5
        zfs_vdev_mirror_rotating_seek_offset                     1048576
        zfs_vdev_ms_count_limit                                   131072
        zfs_vdev_nia_credit                                            5
        zfs_vdev_nia_delay                                             5
        zfs_vdev_open_timeout_ms                                    1000
        zfs_vdev_queue_depth_pct                                    1000
        zfs_vdev_raidz_impl cycle [fastest] original scalar sse2 ssse3 avx2
        zfs_vdev_read_gap_limit                                    32768
        zfs_vdev_rebuild_max_active                                    3
        zfs_vdev_rebuild_min_active                                    1
        zfs_vdev_removal_max_active                                    2
        zfs_vdev_removal_min_active                                    1
        zfs_vdev_scheduler                                        unused
        zfs_vdev_scrub_max_active                                      3
        zfs_vdev_scrub_min_active                                      1
        zfs_vdev_sync_read_max_active                                 10
        zfs_vdev_sync_read_min_active                                 10
        zfs_vdev_sync_write_max_active                                10
        zfs_vdev_sync_write_min_active                                10
        zfs_vdev_trim_max_active                                       2
        zfs_vdev_trim_min_active                                       1
        zfs_vdev_write_gap_limit                                    4096
        zfs_vnops_read_chunk_size                                1048576
        zfs_wrlog_data_max                                    8589934592
        zfs_xattr_compat                                               0
        zfs_zevent_len_max                                           512
        zfs_zevent_retain_expire_secs                                900
        zfs_zevent_retain_max                                       2000
        zfs_zil_clean_taskq_maxalloc                             1048576
        zfs_zil_clean_taskq_minalloc                                1024
        zfs_zil_clean_taskq_nthr_pct                                 100
        zfs_zil_saxattr                                                1
        zil_maxblocksize                                          131072
        zil_min_commit_timeout                                      5000
        zil_nocacheflush                                               0
        zil_replay_disable                                             0
        zil_slog_bulk                                             786432
        zio_deadman_log_all                                            0
        zio_dva_throttle_enabled                                       1
        zio_requeue_io_start_cut_in_line                               1
        zio_slow_io_ms                                             30000
        zio_taskq_batch_pct                                           80
        zio_taskq_batch_tpq                                            0
        zstd_abort_size                                           131072
        zstd_earlyabort_pass                                           1
        zvol_blk_mq_blocks_per_thread                                  8
        zvol_blk_mq_queue_depth                                      128
        zvol_enforce_quotas                                            1
        zvol_inhibit_dev                                               0
        zvol_major                                                   230
        zvol_max_discard_blocks                                    16384
        zvol_open_timeout_ms                                        1000
        zvol_prefetch_bytes                                       131072
        zvol_request_sync                                              0
        zvol_threads                                                   0
        zvol_use_blk_mq                                                0
        zvol_volmode                                                   2
 

probain

Patron
Joined
Feb 25, 2023
Messages
211
Yes. Mine went from 62 to 82 as you can see below
Did you do it via the "kernel options" method? I already know, and have documented (and it's well known) that the "postinit"-method works.
 

PhilD13

Patron
Joined
Sep 18, 2020
Messages
203
No and as I said above
This adjustment to my systems ARC was done on a new setup during testing before being released for production. It worked fine in testing for the intended purpose of the server and is rock solid in production. The server has now been in production for a couple weeks, and the one it replaced (QNAP) is now out of service so I'm not willing to play much with settings, do reboots, apply new releases right away, etc. on it for the sake of playing with it as that is not good policy.

If I have time in the next couple days, I might spin up a Virtualbox VM of Scale on my laptop and try it there, but those results may be skewed as it is a VM on a laptop and I still don't intend to make (nested) VM's from Truenas on it.
 

PhilD13

Patron
Joined
Sep 18, 2020
Messages
203
Did you do it via the "kernel options" method? I already know, and have documented (and it's well known) that the "postinit"-method works.
Can you provide the command(s) you used to look at the values not changing so I can try the same ones/method?
Thanks.
 

probain

Patron
Joined
Feb 25, 2023
Messages
211
Can you provide the command(s) you used to look at the values not changing so I can try the same ones/method?
Thanks.
I did it the same way you did. Looking at the reports page. :smile:And looking at the pie-chart diagram on the main dashboard, gives an imediate and simple way to see if the ARC grows or not.
And just want to make sure. You do know that I'm agreeing with you that the "postinit"-method works. Although I apply it via cron instead. But it's the same thing. That method works as expected. And is immediate. As you know.

What I'm saying, is that setting the kernel options, via the TrueNAS CLI. Doesn't have the same effect, as advertised. And continues to be innefective for hours. After which my patience ran out.
 

PhilD13

Patron
Joined
Sep 18, 2020
Messages
203
Yes, no problem, I remember you use cron to set it. I wish the post came before I put things into production so I could have used the system for testing.

I did a little testing on a Virtualbox setup with TrueNAS-SCALE-23.10.0 as a VM using my laptop since the game was not interesting. Memory assigned to Truenas is 16GB (50%) and also reset to 24GB (75%) memory for testing. The install was upgraded from TrueNAS-SCALE-22.12.4.2.
Unless I'm doing something incorrectly or running in Virtualbox is causing an issue, setting it by cli command line in 23.10.0 does not work. I also tried sudo cli in case it was an issue there with no change. It appears to execute the command but not actually change the value when it is entered. I also tried the shell in Truenas, via Putty (ssh) with the same results. User was admin user setup during install, shell was zsh, all sudo commands enabled, SAMBA authentification enabled

cli
system advanced update kernel_extra_options="zfs_arc_max=10737418240"
Reboot
arc_summary
cli
system advanced update kernel_extra_options="zfs_arc_max=47191459840"
Reboot
arc_summary
cli
system advanced update kernel_extra_options=""
Reboot
arc_summary
Applied these using the GUI using the Init/Shutdown Scripts

Applied System > advanced > Init/Shutdown Scripts

Create and Set command to:
echo 10737418240>> /sys/module/zfs/parameters/zfs_arc_max
save,
reboot,
sudo arc_summary
zfs_arc_max reflects value of 10737418240

Set command to:
echo 47191459840>> /sys/module/zfs/parameters/zfs_arc_max
save,
reboot,
sudo arc_summary
zfs_arc_max reflects value of 47191459840

Set command to disable
Each time I made the change
save,
reboot,
sudo arc_summary
zfs_arc_max reflects value of 0
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Is it now safe to set the arc max to 99% of total RAM?
 

Sawtaytoes

Patron
Joined
Jul 9, 2022
Messages
221
I also set that `cli` command and restarted. No change after restarting. So I think it doesn't save it in the current build of 23.10.0.
 

PhilD13

Patron
Joined
Sep 18, 2020
Messages
203
I also set that `cli` command and restarted. No change after restarting. So I think it doesn't save it in the current build of 23.10.0.
That is what I found. It did not apply the change but did not throw an error either.
 

PhilD13

Patron
Joined
Sep 18, 2020
Messages
203
Is it now safe to set the arc max to 99% of total RAM?
I'm going to say NO! Especially since the setting may or may not work.
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
I also set that `cli` command and restarted. No change after restarting. So I think it doesn't save it in the current build of 23.10.0.
That ended up being correct, updated instructions with correct procedure now.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
1699910425753.png

Applied via CLI
 

Sawtaytoes

Patron
Joined
Jul 9, 2022
Messages
221
Here are some pictures to help others out for my 256GB of RAM:

Code:
# This is for 256GB of RAM with only 32GB left over.
echo 235750068224 >> /sys/module/zfs/parameters/zfs_arc_max

1699923072586.png
 
Top