Date: Thu, 05 Dec 2002 03:25:35 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: Varshavchick Alexander <alex@metrocom.ru> Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: maxusers and random system freezes Message-ID: <3DEF37AF.182DD85@mindspring.com> References: <Pine.GSO.4.33.0212051315320.7912-100000@apache.metrocom.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Varshavchick Alexander wrote: > > So: 2G might be OK, 3G would be more certain, given you are cranking > > some things up, in the config you posted, that make me think you will > > be eating more physical memory. > > Are you talking primarily about SHMMAXPGS=262144 option here? Then may be > it'll be oevrall better to reduce it and make KVA space 2G, to leave more > room for user address space? That's the one I was referring to, yes, but you didn't post your whole config (please do *NOT* post it; I can't spend the time on going over it line by line). Tuning is a skill; it can be plotted out as a cookbook recipe, but it takes a lot of work to do that, and no one has volunteered. Basically, to write out a cookbook, you have to know where every byte of memory is going in the kernel, and what tunables impact each other, and how they are related. Once you know that, you could easily write a program to kick out a configuration file for various usages, or even modify the code to auto-tune itself (everything by KVA space, which impacts the base address that the kernel gets linked to... unless you compile the entire kernel PIC, which I do not recommend). But knowing the information is hard. I know it for 4.3 and 4.4. > You see, there cannot be any much possibility > to make experiments with this server, so I very much relay on your > advices, thank you again. If you are having system freeses at random, and you want to fix them instead of living with them, some experimentation is going to be inevitable. I don't know enough about your installation to be able to give you a kernel config file to use that will magically fix all your current issues for you, and prevent future issues from coming up. That's going to have to be up to you. > > If you follow the 1.5 rule, then you will have 6G of swap when you > > have 4G of physical RAM, and will definitely need to go for 3G of > > KVA space. > > No, the swap is very slightly used on this server, and the total swap > size is 2G. It doesn't matter. The amount of swap the kernel allocates page tables for is based on the amount of physical RAM in the machine. You pay for the page tables whether you use them or not, for swap, for the kernel, and for any memory which you permit to be allocated at interrupt time, plus any allocations that occur after you are up and running, until you run out of physical RAM. This is "one of those things" you just have to know about how the kernel uses virtual memory, if you are going to be a skilled kernel tuner. As a rule, swap should be at least physical memory size + 64K on any system that you need to be able to get a system dump from, since it needs to dump physical RAM. If you are not worried about the machine falling over, then you can ignore that. Note that "man tuning" suggests 2* physical RAM for swap. PS: I am going to be out of touch (able to download, but not send email) for the next couple of days... up to a week. If you have more questions, and they can't wait, you will need to ask someone else. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DEF37AF.182DD85>