Set ARC cache size

Moderators: jhartley, MSR734, nola

Set ARC cache size

Post by si-ghan-bi » Mon Sep 17, 2012 12:36 pm

Hello,
with zstat I get:

Code: Select all
v2012.09.14     45 threads        1 mount        45378 vnodes     19:34:04
____________________________________________________________________________
             KALLOC      KERNEL/MAPS        TOTAL         EQUITY
  WIRED     116 MiB    2181 MiB/2185         2298 MiB      37.41%
  PEAK      134 MiB    2282 MiB              2417 MiB
  VMPAGE     115592 (IN)      15824 (OUT)      15824 (SYNC)       8696 (MDS)
____________________________________________________________________________
                     HITS                  MISSES
  ARC overall:        89% (60629039)          11% (6927239)
  ARC demand data:    83% (4878388)           17% (967536)
  ARC demand meta:    90% (40923318)          10% (4260445)
  ARC prefetch data:  17% (108296)            83% (511761)
  ARC prefetch meta:  92% (14719037)           8% (1187497)
  DMU zfetch:         92% (146245447)          8% (11049723)


89% hits is good, but 2 GB cache is unacceptable on my Mac with 6 GB total. I want to reduce it to 1 GB (and maybe 512 MB, I will see). After all, a smaller cache (not unreasonably small) should limit the performances to those of the raw unit.

How can I limit the L2ARC size?
si-ghan-bi Offline


 
Posts: 145
Joined: Sat Sep 15, 2012 5:55 am

Re: Set ARC cache size

Post by si-ghan-bi » Tue Sep 18, 2012 5:43 pm

I wrte the wrong topic title: I meant ARC size, not L2ARC.

Has anyone hints about the steps required?
si-ghan-bi Offline


 
Posts: 145
Joined: Sat Sep 15, 2012 5:55 am

Re: Set ARC cache size

Post by si-ghan-bi » Wed Sep 19, 2012 2:56 pm

My system is getting pretty slow and the advantage of the big ARC is killed by the swapping.
Is there a way to set its size?
thanks
si-ghan-bi Offline


 
Posts: 145
Joined: Sat Sep 15, 2012 5:55 am

Re: Set ARC cache size

Post by wonkywonky » Thu Sep 20, 2012 11:18 am

Hmn, so I've actually got the opposite problem. I have 16GB of RAM on my NAS box and could allocate more to the ARC.

Is there a way to do this?
wonkywonky Offline


 
Posts: 25
Joined: Fri Sep 14, 2012 11:33 pm

Re: Set ARC cache size

Post by si-ghan-bi » Thu Sep 20, 2012 3:43 pm

Could you please report the same lines I posted? I'm curious to see them and compare.
si-ghan-bi Offline


 
Posts: 145
Joined: Sat Sep 15, 2012 5:55 am

Re: Set ARC cache size

Post by wonkywonky » Thu Sep 20, 2012 8:54 pm

NAS
Pool 1: 3TB used, 5.5TB capacity
Pool 2: 300GB used, 500GB capacity.

Code: Select all
v2012.09.14     90 threads        2 mounts       18230 vnodes     09:51:18
____________________________________________________________________________
             KALLOC      KERNEL/MAPS        TOTAL         EQUITY
  WIRED      15 MiB    3234 MiB/3250         3250 MiB      19.84%
  PEAK       83 MiB    3405 MiB              3489 MiB
  VMPAGE       1602 (IN)        317 (OUT)        317 (SYNC)        202 (MDS)
____________________________________________________________________________
                     HITS                  MISSES
  ARC overall:        78% (3769851)           22% (1050862)
  ARC demand data:    98% (1870728)            2% (26317)
  ARC demand meta:    96% (1856132)            4% (67899)
  ARC prefetch data:   1% (19187)             99% (944931)
  ARC prefetch meta:  67% (23804)             33% (11715)
  DMU zfetch:         80% (6685051)           20% (1575365)


Desktop
Pool: 300GB used, 750GB capacity

Code: Select all
v2012.09.14     45 threads        1 mount       100748 vnodes     09:56:50
____________________________________________________________________________
             KALLOC      KERNEL/MAPS        TOTAL         EQUITY
  WIRED      22 MiB     515 MiB/523           538 MiB      3.28%
  PEAK       22 MiB    1587 MiB              1610 MiB
  VMPAGE        268 (IN)        172 (OUT)        172 (SYNC)         42 (MDS)
____________________________________________________________________________
                     HITS                  MISSES
  ARC overall:        94% (825867)             6% (44762)
  ARC demand data:    97% (65410)              3% (1971)
  ARC demand meta:    96% (617884)             4% (24205)
  ARC prefetch data:  57% (20449)             43% (15058)
  ARC prefetch meta:  97% (122124)             3% (3528)
  DMU zfetch:         97% (1005441)            3% (21641)
wonkywonky Offline


 
Posts: 25
Joined: Fri Sep 14, 2012 11:33 pm

Re: Set ARC cache size

Post by satadru » Sat Sep 29, 2012 3:27 pm

I could also be ok with more of my 6Gb of RAM going towards ARC, since this machine is primarily a file server.

Pools:
2Tb pool, 1Tb pool, 30Gb pool.

Code: Select all
v2012.09.23    234 threads        3 mounts        1745 vnodes     16:24:43
____________________________________________________________________________
             KALLOC      KERNEL/MAPS        TOTAL         EQUITY
  WIRED      16 MiB    1018 MiB/1047         1034 MiB      16.83%
  PEAK       66 MiB    1749 MiB              1815 MiB
  VMPAGE         11 (IN)          0 (OUT)          0 (SYNC)          0 (MDS)
____________________________________________________________________________
                     HITS                  MISSES
  ARC overall:        88% (28561859)          12% (3540575)
  ARC demand data:    97% (13659559)           3% (364118)
  ARC demand meta:    99% (10533302)           1% (103511)
  ARC prefetch data:  50% (2907092)           50% (2826450)
  ARC prefetch meta:  85% (1461906)           15% (246496)
  DMU zfetch:         98% (469213754)          2% (7615798)
____________________________________________________________________________
satadru Offline


 
Posts: 20
Joined: Fri Sep 14, 2012 10:07 pm

Re: Set ARC cache size

Post by NakkiNyan » Sat Oct 06, 2012 6:38 am

My arc misses are pretty bad too.
Code: Select all
v2012.09.23    107 threads        2 mounts         445 vnodes     07:37:10
____________________________________________________________________________
             KALLOC      KERNEL/MAPS        TOTAL         EQUITY
  WIRED      19 MiB     545 MiB/564           565 MiB      3.45%
  PEAK       54 MiB    1817 MiB              1872 MiB
  VMPAGE        199 (IN)        162 (OUT)        162 (SYNC)          0 (MDS)
____________________________________________________________________________
                     HITS                  MISSES
  ARC overall:        66% (15018581)          34% (7462717)
  ARC demand data:    99% (6713092)            1% (19174)
  ARC demand meta:    98% (7901443)            2% (97953)
  ARC prefetch data:   0% (68494)            100% (7305622)
  ARC prefetch meta:  89% (335552)            11% (39968)
  DMU zfetch:         96% (9809569)            4% (404353)

As you can see it is using very little RAM and was even when I was copying a ton of files over, it would be nice to be able to force it.
NakkiNyan Offline


 
Posts: 47
Joined: Tue Oct 02, 2012 12:19 pm

Re: Set ARC cache size

Post by maxijazz » Sun Mar 17, 2013 8:36 pm

Yep. I would like to see a way to set ARC's minimum and maximum values.
maxijazz Offline


 
Posts: 12
Joined: Wed Sep 19, 2012 8:42 pm

Re: Set ARC cache size

Post by raattgift » Mon Mar 18, 2013 11:54 am

You can't, not with the ZEVO port. You can do "evil tuning" in other ports of ZFS (FreeBSD or the various post-Solaris OSes), but it's not recommended.

On the other ZEVO's port -- like the others -- rapidly releases ARC memory when system memory is low. ARC should never cause application data to be paged out.

No paging, no problem... if you see a big ARC and lots of pageouts, report it as a bug !

Additionally, what you can do to try to reduce ARC size "by hand" is : zfs set primarycache=metadata pool/dataset
for each dataset. The user data then will be cached only by the UBC.

This is likely to worsen performance for practically all workloads as the ARC is very well designed, but you should really instrument that with your workload and system configuration, rather than guess. Turning off caching is unlikely to be a win. If you think it is, kindly quantify the difference and share the numbers.
raattgift Offline


 
Posts: 98
Joined: Mon Sep 24, 2012 11:18 pm


Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 1 guest

cron