Re: adding more ram
On Wed, 10 Dec 2003, Dan Nelson wrote: > In the last episode (Dec 10), [EMAIL PROTECTED] said: > > I have a server with 1GB of RAM and a swap partition of 2GB i will > > upgrade the memory server to 2GB so my questions are: > > > > should i fix the swap partition to have now 4GB of space ? > > Depends. Have you ever used up that 2gb of swap? If not, you'll > probably never consume 4gb either :) If this is a database server, or > something similar where a few processes allocate large amounts of > memory, you don't need much swap anyway, since if any of those processes > actually has to swap, you end up thrashing the system as it tries to > swap 500mb processes in and out of memory. I really can't think of a > system that would still perform well with 2 or 3GB of process space in > swap. At the 2gb RAM point, you usually have a system where any > swapping == bad news. Actually, the thing I use swap for most now is to make sure I can allocate large temporary file systems without consuming excessive kernel address space. I.e., I'll often create a 512mb swap-backed md device for /tmp, and make sure I have enough swap to fully back it and everything else, even though the chances are I won't touch it in normal operation. I just don't want to run out in the event something does need it... Robert N M Watson FreeBSD Core Team, TrustedBSD Projects [EMAIL PROTECTED] Senior Research Scientist, McAfee Research ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
FreeBSD 5.1 Automount - amd.map help?
Hey again! Thanks for the previous help trying to update from 5.1 to 5.2. Now, I'm trying to setup amd and have setup and amd.conf to go along with it (I have attached amd.conf). In rc.conf, I have also cleared the amd_flags so that it loads amd.conf. However, I was curious how the /etc/amd.map (also attached) that comes with the default install works? The man pages are rather skimpy on information. I only got the amd.conf file working by following the example, /usr/src/contrib/amd/scripts/amd.conf-sample. Thanks again for any help. Also, does anyone know any good site that describes how the amd.map works so that I can create my own? I'd like to automount home directories and other exports off of remote servers (not using fstab). -- William Michael Grim Student, Southern Illinois University at Edwardsville Unix Network Administrator, SIUE, Computer Science dept. Phone: (217) 341-6552 Email: [EMAIL PROTECTED] [ global ] normalize_hostnames = yes restart_mounts =yes unmount_on_exit = yes auto_dir = /a cache_duration =300 #local_domain = dnsalias.net print_version = no log_file = /var/log/amd dismount_interval = 120 #nis_domain = grimnet.dnsalias.net log_options = fatal,error,user,warn,info,map,stats,all #debug_options =all plock = no selectors_in_defaults = yes show_statfs_entries = yes # LDAP (Lightweight Directory Access Protocol) options #ldap_base ="ou=Marketing, o=AMD Ltd, c=US" #ldap_hostports = ldap.your.domain:389 #ldap_cache_seconds = 0 #ldap_cache_maxmem =131072 hesiod_base = automount # these 5 options can be overridden by each map individually browsable_dirs =yes map_options = cache:=all map_type = file mount_type =nfs search_path = /etc/amdmaps # alternate RPC program number to register with the port mapper portmap_program = 300019-300029 fully_qualified_hosts = yes nfs_vers = 3 nfs_proto = tcp ## # DEFINE AN AMD MOUNT POINT [ /home ] # map name must be defined, all else are optional map_name = /etc/amd.home map_options = cache:=all # if map type is not defined, will search all map types (default) #map_type = file|hesiod|ndbm|nis|nisplus|passwd|union|ldap #search_path = /etc/local:/etc/amdmaps:/misc/yp # an amd or autofs mount point mount_type =nfs browsable_dirs =yes # an optional tag to be used with amd -T tag. untagged entries are always # used. Tagged ones get used only if specified with "amd -T" #tag = test ## # DEFINE ANOTHER AMD MOUNT POINT [ /src ] #map_name = /usr/local/lib/amdmaps/amu.src # regular amd (nfs) mount point (default) # don't try the "autofs" type. It is not implemented yet. #mount_type = nfs ## # $FreeBSD: src/etc/amd.map,v 1.9 2002/05/15 22:24:29 obrien Exp $ # /defaults type:=host;fs:=${autodir}/${rhost}/host;rhost:=${key} * opts:=rw,grpid,resvport,vers=3,proto=udp,nosuid,nodev ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Disillusioned with PAM
Is Kerberos 5 the only non-dummy PAM implementation of the pam_sm_chauthtok method (password changing/management)? I've been looking (and grepping) through the source of the PAM modules in 4.8 and 4.9, to check how I should interface to a chauthtok method. Not just the ones built and installed on the system, from /usr/src/lib/libpam, but the whole Linux PAM directory in /usr/src/contrib/libpam. Can it really be that pam_krb5 is the *only* PAM module supplied which implements a working password change function? I see three dummy versions (tacacs+ and the contrib pam_permit and pam_warn) and that seems to be it. /usr/bin/passwd will be a real pain to use for a Web GUI as it requires a pty, which means extensive "coding around it" to fake one up for it a la poppassd. I thought PAM was going to solve this for me, because of the "password management" function designed in... only it appears so far that no PAM method which implements local password changing actually exists on FreeBSD. What a mess. (Yeah, I know, I know - stop grumbling, code one, and contribute it.) -- Clifton -- Clifton Royston -- [EMAIL PROTECTED] Tiki Technologies Lead Programmer/Software Architect Did you ever fly a kite in bed? Did you ever walk with ten cats on your head? Did you ever milk this kind of cow? Well we can do it. We know how. If you never did, you should. These things are fun, and fun is good. -- Dr. Seuss ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: adding more ram
In a message written on Thu, Dec 11, 2003 at 02:42:12AM -, Sparrevohn, Thomas wrote: > The /var size should properly stay as recommended. But a sanity > check on the available space when enabling crash dumps might be a > good idea Right, I didn't want to change the default suggestion, just put near that recomendation that crash dumps may greatly increase /var need, and also mention that in the swap sizing section as to why swap == ram should probably be a minimum (otherwize you can't turn on crash dumps without repartitioning). -- Leo Bicknell - [EMAIL PROTECTED] - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - [EMAIL PROTECTED], www.tmbg.org pgp0.pgp Description: PGP signature
RE: adding more ram
The /var size should properly stay as recommended. But a sanity check on the available space when enabling crash dumps might be a good idea -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leo Bicknell Sent: 11 December 2003 02:27 To: [EMAIL PROTECTED] Subject: Re: adding more ram Speaking of tuning, it should probably mention a swap partition must be larger than RAM to support crash dumps, and /var needs to have space for nxRAM dumps, where n is how many you want to keep. I've seen too many people with 2G RAM and 1G swap, or a 1G machine with crash dumps enabled and a 128M /var, as recomended. -- Leo Bicknell - [EMAIL PROTECTED] - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - [EMAIL PROTECTED], www.tmbg.org ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: adding more ram
Speaking of tuning, it should probably mention a swap partition must be larger than RAM to support crash dumps, and /var needs to have space for nxRAM dumps, where n is how many you want to keep. I've seen too many people with 2G RAM and 1G swap, or a 1G machine with crash dumps enabled and a 128M /var, as recomended. -- Leo Bicknell - [EMAIL PROTECTED] - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - [EMAIL PROTECTED], www.tmbg.org pgp0.pgp Description: PGP signature
Re: adding more ram
> The same was true for 10.20 and 11 Versions of HPUX - I believe there once > was I very long going debate when the "new" FreeBSD vm was made on the > issue. The fundamental question at the time was what to do when you run out > of swap/vm space. The 1-1 backing of swap space was seen as a way to avoid > that you have resort to kill random processes in order to free up space and > the tradition with the 2-1 swap ratio used to have "a performance reason" > in the initial Unix Swap and paging implementations. I can't seem to recall > the actual reason While we're at this topic, can somebody plz briefly explain how does swap performance depend on swap size? From `man 7 tuning` (May 25, 2001): The kernel's VM paging algorithms are tuned to perform best when there is at least 2x swap versus main mem- ory. Configuring too little swap can lead to inefficiencies in the VM page scanning code as well as create issues later on if you add more mem- ory to your machine. Is this still true? For -CURRENT also? 10.12.2003; 18:42:17 [SorAlx] http://cydem.org.ua/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: adding more ram
The same was true for 10.20 and 11 Versions of HPUX - I believe there once was I very long going debate when the "new" FreeBSD vm was made on the issue. The fundamental question at the time was what to do when you run out of swap/vm space. The 1-1 backing of swap space was seen as a way to avoid that you have resort to kill random processes in order to free up space and the tradition with the 2-1 swap ratio used to have "a performance reason" in the initial Unix Swap and paging implementations. I can't seem to recall the actual reason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Vermillion Sent: 10 December 2003 14:41 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: adding more ram While normally not able to pour water out of a boot with instructions on the heel, on Wed, Dec 10, 2003 at 02:41 our dear friend Mike Silbersack uttered this load of codswallop: Just one slight addendum here. > I'm replying because I want to answer your real question. > The notion of swap = 2 x ram is an old one, and is no longer > applicable. (Some) older VM systems used very simplistic swapping > mechanisms, which required entire processes to be swapped, thereby > requiring large amounts of swap space. FreeBSD (and other modern OSes) > page out to the swap file in increments of 4K pages, and do so in a > flexible manner. As a result, you should always have *some* swap space > to handle overload cases, but it's not necessary to keep any specific > ram to swap ratio. Systems such as the Irix I used before moving the servers to FBSD around 1996 - reserverd swap space for applications when the application started up so those needed large swap space. Often it was never used, but the design allocated it anyway. Bill -- Bill Vermillion - bv @ wjv . com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: porting linux SOCK_RAW to freebsd
Andy Hilker wrote: Hi, i try porting a little utility from linux to freebsd. Maybe someone could give me a hint, what i am doing wrong. -- snip -- /* Note: not portable */ // if ((s = socket(AF_INET, SOCK_PACKET, SOCK_PACKET)) < 0) { // ??? ported if ((s = socket(AF_INET,SOCK_RAW,IPPROTO_RAW)) < 0) { if (errno == EPERM) fprintf(stderr, "programm must run as root\n"); else perror("programm: socket"); if (! debug) return 2; } /* Fill in the source address, if possible. The code to retrieve the local station address is Linux specific. */ /* Note: not portable */ /* if (! opt_no_src_addr){ struct ifreq if_hwaddr; unsigned char *hwaddr = ifr_addr.sa_data; strcpy(if_hwaddr.ifr_name, ifname); if (ioctl(s, SIOCGIFHWADDR, &if_hwaddr) < 0) { fprintf(stderr, "SIOCGIFHWADDR on %s failed: %s\n", ifname, strerror(errno)); return 1; } memcpy(outpack+6, if_hwaddr.ifr_hwaddr.sa_data, 6); if (verbose) { printf("The hardware address (SIOCGIFHWADDR) of %s is type %d " "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", ifname, if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1], hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]); } } */ // ??? ported, xx:xx:xx:xx:xx:xx = MAC Adress of sender memcpy(outpack+6, "xx:xx:xx:xx:xx:xx", 6); /* Note: not portable */ /* whereto.sa_family = 0; strcpy(whereto.sa_data, ifname); if ((i = sendto(s, outpack, pktsize, 0, &whereto, sizeof(whereto))) < 0) perror("sendto"); else if (debug) printf("sendto returned %d.\n", i); */ // ??? ported, fxp0 = sending interface whereto.sa_family = 0; strcpy(whereto.sa_data, "fxp0"); if ((i = sendto(s, outpack, pktsize, 0, &whereto, sizeof(whereto))) < 0) perror("sendto"); else if (debug) printf("sendto returned %d.\n", i); -- snip -- bye, Andy I wrote a paper on FreeBSD raw sockets a while ago. You can find it here: http://www.reversedhell.net/rawsockets/raw_tcp.tgz or here: http://packetstormsecurity.org/programming-tutorials/raw_tcp.tgz Cheers/bye, Alin. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Sound Blaster Audigy LS problem
On Tue, 4 Nov 2003 10:26:53 +0300 "Yuriy Tsibizov" <[EMAIL PROTECTED]> wrote: > 4) http://chibis.persons.gfk.ru/audigy/ mine With the new `emuctrl` software it makes it easier to control everything on your Audigy cards. This driver is really the one I would use (and I'm using it actually :D) Regards -- Pierrick Brossin < http://www.swissgeeks.com > perl -e\ 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);' ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: adding more ram
On Wed, Dec 10, 2003 at 09:41:11AM -0500, Bill Vermillion wrote: > Systems such as the Irix I used before moving the servers to FBSD > around 1996 - reserverd swap space for applications when the > application started up so those needed large swap space. Often it > was never used, but the design allocated it anyway. I also remember what fun could be had on an IRIX 5.3 machine with leaky X11 servers. SGI's Xsgi memory leaks on that IRIX release were particularly noticeable when using it on a 24-bit Indy and viewing lots of porn^Wgraphics. This seemed to be down to Xsgi reserving lots of swap in lieu of a heavy backing store workload, which it didn't actually use. And this often brought Xsgi crashing to a halt anyway. So I would have mixed feelings about adopting such a scheme in future. BMS ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: adding more ram
While normally not able to pour water out of a boot with instructions on the heel, on Wed, Dec 10, 2003 at 02:41 our dear friend Mike Silbersack uttered this load of codswallop: Just one slight addendum here. > I'm replying because I want to answer your real question. > The notion of swap = 2 x ram is an old one, and is no > longer applicable. (Some) older VM systems used very simplistic > swapping mechanisms, which required entire processes to be > swapped, thereby requiring large amounts of swap space. FreeBSD > (and other modern OSes) page out to the swap file in increments > of 4K pages, and do so in a flexible manner. As a result, you > should always have *some* swap space to handle overload cases, > but it's not necessary to keep any specific ram to swap ratio. Systems such as the Irix I used before moving the servers to FBSD around 1996 - reserverd swap space for applications when the application started up so those needed large swap space. Often it was never used, but the design allocated it anyway. Bill -- Bill Vermillion - bv @ wjv . com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
porting linux SOCK_RAW to freebsd
Hi, i try porting a little utility from linux to freebsd. Maybe someone could give me a hint, what i am doing wrong. -- snip -- /* Note: not portable */ // if ((s = socket(AF_INET, SOCK_PACKET, SOCK_PACKET)) < 0) { // ??? ported if ((s = socket(AF_INET,SOCK_RAW,IPPROTO_RAW)) < 0) { if (errno == EPERM) fprintf(stderr, "programm must run as root\n"); else perror("programm: socket"); if (! debug) return 2; } /* Fill in the source address, if possible. The code to retrieve the local station address is Linux specific. */ /* Note: not portable */ /* if (! opt_no_src_addr){ struct ifreq if_hwaddr; unsigned char *hwaddr = ifr_addr.sa_data; strcpy(if_hwaddr.ifr_name, ifname); if (ioctl(s, SIOCGIFHWADDR, &if_hwaddr) < 0) { fprintf(stderr, "SIOCGIFHWADDR on %s failed: %s\n", ifname, strerror(errno)); return 1; } memcpy(outpack+6, if_hwaddr.ifr_hwaddr.sa_data, 6); if (verbose) { printf("The hardware address (SIOCGIFHWADDR) of %s is type %d " "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", ifname, if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1], hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]); } } */ // ??? ported, xx:xx:xx:xx:xx:xx = MAC Adress of sender memcpy(outpack+6, "xx:xx:xx:xx:xx:xx", 6); /* Note: not portable */ /* whereto.sa_family = 0; strcpy(whereto.sa_data, ifname); if ((i = sendto(s, outpack, pktsize, 0, &whereto, sizeof(whereto))) < 0) perror("sendto"); else if (debug) printf("sendto returned %d.\n", i); */ // ??? ported, fxp0 = sending interface whereto.sa_family = 0; strcpy(whereto.sa_data, "fxp0"); if ((i = sendto(s, outpack, pktsize, 0, &whereto, sizeof(whereto))) < 0) perror("sendto"); else if (debug) printf("sendto returned %d.\n", i); -- snip -- bye, Andy ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: adding more ram
On Wed, 10 Dec 2003 [EMAIL PROTECTED] wrote: > Hi all. > > I have a server with 1GB of RAM and a swap partition of 2GB i will upgrade > the memory server to 2GB so my questions are: > > should i fix the swap partition to have now 4GB of space ? > > what other changes do i have to make to my system after adding more ram ? > > regards. Dan's advice seems good; swapping more than a gig of data would be awful. I'm replying because I want to answer your real question. The notion of swap = 2 x ram is an old one, and is no longer applicable. (Some) older VM systems used very simplistic swapping mechanisms, which required entire processes to be swapped, thereby requiring large amounts of swap space. FreeBSD (and other modern OSes) page out to the swap file in increments of 4K pages, and do so in a flexible manner. As a result, you should always have *some* swap space to handle overload cases, but it's not necessary to keep any specific ram to swap ratio. (Actually, the term "swapping" is still used inside the FreeBSD kernel, but it only applies to paging out the last 20K or so of a process's memory.) Now, to contradict myself, there *is* a reason that you might wish to have a larger swapfile. Taking a crashdump requires that the swap file must be of the size RAM + 64K or so. Hence, your present swap file might be slightly too small to take a crashdump once you upgrade to 2G ram. Whether this is an issue for you or not depends on how often your machine crashes and whether you wish to debug it. :) Mike "Silby" Silbersack ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"