Skip to content

Commit

Permalink
[vpsAdminOS] tune ARC and dirty data defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
snajpa committed Oct 5, 2022
1 parent fb296cd commit ce28cd1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions module/os/linux/zfs/arc_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ static struct notifier_block arc_hotplug_callback_mem_nb;
uint64_t
arc_default_max(uint64_t min, uint64_t allmem)
{
/* Default to 1/2 of all memory. */
return (MAX(allmem / 2, min));
/* Default to 1/4 of all memory */
return MAX(allmem / 4, min);
}

#ifdef _KERNEL
Expand Down Expand Up @@ -421,7 +421,7 @@ arc_hotplug_callback(struct notifier_block *self, unsigned long action,

#ifdef __LP64__
if (zfs_dirty_data_max_max == 0)
zfs_dirty_data_max_max = MIN(4ULL * 1024 * 1024 * 1024,
zfs_dirty_data_max_max = MIN(128ULL * 1024 * 1024 * 1024,
allmem * zfs_dirty_data_max_max_percent / 100);
#else
if (zfs_dirty_data_max_max == 0)
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8002,7 +8002,7 @@ arc_init(void)
*/
#ifdef __LP64__
if (zfs_dirty_data_max_max == 0)
zfs_dirty_data_max_max = MIN(4ULL * 1024 * 1024 * 1024,
zfs_dirty_data_max_max = MIN(128ULL * 1024 * 1024 * 1024,
allmem * zfs_dirty_data_max_max_percent / 100);
#else
if (zfs_dirty_data_max_max == 0)
Expand Down
2 changes: 1 addition & 1 deletion module/zfs/dsl_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ unsigned long zfs_wrlog_data_max = 0;
* zfs_dirty_data_max), push out a txg. This should be less than
* zfs_vdev_async_write_active_min_dirty_percent.
*/
int zfs_dirty_data_sync_percent = 20;
int zfs_dirty_data_sync_percent = 23;

/*
* Once there is this amount of dirty data, the dmu_tx_delay() will kick in
Expand Down

0 comments on commit ce28cd1

Please sign in to comment.