DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 30th October 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default ZFS

Dear ZFS guru's

I never had a I386 computer with enough RAM to play with ZFS. I now have one with 2GB memory. Is http://wiki.freebsd.org/ZFSTuningGuide still applicable for such a system?

I only have a single disk in it, but I just want to play with ZFS snapshots and jails.
Any suggestions or helpful advice for a ZFS noob ?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #2   (View Single Post)  
Old 30th October 2011
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

Hello, zfs noob (j/k)
This is your lucky day. I have i386 with 2.5GB, and before I replaced one ram module, it had 2GB

Code:
vfs.zfs.arc_max=134217728    # 128 MB
vm.kmem_size=536870912        # 512 MB
vm.kmem_size_max=536870912    # 512 MB
vfs.zfs.vdev.cache.size=8388608    # 8 MB
I use these settings in /boot/loader.conf with GENERIC

I also had custom kernel with
Code:
options        KVA_PAGES=384
and
Code:
vfs.zfs.arc_max=629145600    # 600 MB
vm.kmem_size=1153433600        # 1100 MB
vm.kmem_size_max=1153433600    # 1100 MB
vfs.zfs.vdev.cache.size=8388608    # 8 MB
But you might need to tune these numbers (make them lower). That includes KVA_PAGES. remember that KVA_PAGES must divide by 4 (KVA_PAGES % 4 = 0)


I recommend you start with first pair of settings and GENERIC and see if it will crash or not. I think it will not (also I recommend 8-STABLE or 9)
Reply With Quote
  #3   (View Single Post)  
Old 30th October 2011
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Quote:
Originally Posted by J65nko View Post
Dear ZFS guru's

I never had a I386 computer with enough RAM to play with ZFS. I now have one with 2GB memory. Is http://wiki.freebsd.org/ZFSTuningGuide still applicable for such a system?

I only have a single disk in it, but I just want to play with ZFS snapshots and jails.
Any suggestions or helpful advice for a ZFS noob ?
I currently run ZFS on 1GB RAM box (amd64 through), it uses 2TB ZFS mirror (90%+ full), used for SAMBA and NFS, also for other services, works like a charm without any tuning:

Code:
# uptime
11:24AM  up 148 days,  2:26, 2 users, load averages: 0.04, 0.18, 0.11
So 2GB RAM is more then enough, I run 8.2-STABLE amd64 from about 2011-04.

... any reasons to stick to i386?
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #4   (View Single Post)  
Old 30th October 2011
drhowarddrfine drhowarddrfine is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 377
Default

Quote:
Originally Posted by vermaden View Post
... any reasons to stick to i386?
Cause he's a cheap bastard.
Reply With Quote
  #5   (View Single Post)  
Old 30th October 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Vermaden, so the following from http://wiki.freebsd.org/ZFSTuningGuide#amd64 nowadays even seems to apply to amd64 systems with only 1 GB of memory .....
Quote:
amd64

FreeBSD 7.2+ has improved kernel memory allocation strategy and no tuning may be necessary on systems with more than 2 GB of RAM.
Since several years I have an am64 system with 1 GB of RAM, it is my main desktop system running OpenBSD adm64. Never knew I could have used ZFS on it

The recently acquired 2GB system has a Pentium IV cpu, so strictly i386 only :
Code:
OpenBSD 5.0-current (GENERIC) #71: Fri Oct  7 12:57:13 MDT 2011
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) 4 CPU 3.20GHz ("GenuineIntel" 686-class) 3.20 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,
      CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,CNXT-ID,xTPR
real mem  = 2146693120 (2047MB)
avail mem = 2101518336 (2004MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 03/17/05, BIOS32 rev. 0 @ 0xf0010,
                   SMBIOS rev. 2.3 @ 0xf04b0 (65 entries)
bios0: vendor American Megatrends Inc. version "1009.001" date 03/17/2005
bios0: ASUSTeK Computer Inc. P5P800
It was previously owned by my wife. My daughter assembled a new quad-core for her mam, so in one way you could call me a lucky, cheap bastard

@graudeejs

Thanks for the tweaks I will try them and report back.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #6   (View Single Post)  
Old 30th October 2011
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

BTW: KVA_PAGES value mentioned above was highest I could run FreeBSD without core dumping at boot time. You will need to lower this value (if you'll use it)

Last edited by graudeejs; 30th October 2011 at 07:05 PM.
Reply With Quote
  #7   (View Single Post)  
Old 10th November 2011
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

Depending on the P4 chip, you may be able to run the amd64 version of FreeBSD. You'd have to look at it under FreeBSD, though, to see if it supports LM (note the AMD features below, taken from my FreeBSD 8.2 box):
Code:
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (2999.92-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf65  Family = f  Model = 6  Stepping = 5
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0xe59d<SSE3,DTES64,MON,DS_CPL,EST,TM2,CNXT-ID,CX16,xTPR,PDCM>
  AMD Features=0x20100000<NX,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant
While you shouldn't need to tune anything, you can guarantee better performance if you do some manually ZFS tunings. Depending on what else you will be running on the box, you will want to limit how much RAM is used by the ZFS ARC. For example, my home "server" runs Samba, NFS, DLNA services, torrent downloading, etc, so I limit the ARC to only 768 MB (out of 2 GB) to leave room for the other services.

You will also want to make sure you disabled prefetching (it should be disabled automatically, but it's good to manually disable it as well).
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:45 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick