ubc_borrowpercent ? What's the purpose of these param?

ubc_borrowpercent ? What's the purpose of these param?

Post by domp » Thu, 19 Jun 2003 18:16:29



Hi,

I don't understand what the 'ubc_borrowpercent' kernel param is used
for.
Basically, to configure the UBC, you can set the min (usually 10%) and
the max (usually 100%) physical memory usage.
But what is the purpose of the 'ubc_borrowpercent' param? The manual
states that this param indicates the memory 'borrowed' from the VM.
But I don't see the point of this param. Doesn't the VM take all the
memory it needs (except the 10% for the ubc min) when it needs memory?
When does the ubc borrow from the VM memory. Why? Is there any way you
can see if the UBC has borrowed memory from the VM?
Isn't this bad for the system? I mean, if the UBC needs to borrow
memory from the VM, doesn't this happen when the system has no more
physical memory left?

I am confused, any help would be greatly appreciated.

Kd

 
 
 

ubc_borrowpercent ? What's the purpose of these param?

Post by Lukasz Tylutk » Thu, 19 Jun 2003 19:08:42


Uz.ytkownik dompie napisa?:

Quote:> Hi,

> I don't understand what the 'ubc_borrowpercent' kernel param is used
> for.
> Basically, to configure the UBC, you can set the min (usually 10%) and
> the max (usually 100%) physical memory usage.
> But what is the purpose of the 'ubc_borrowpercent' param? The manual
> states that this param indicates the memory 'borrowed' from the VM.
> But I don't see the point of this param. Doesn't the VM take all the
> memory it needs (except the 10% for the ubc min) when it needs memory?
> When does the ubc borrow from the VM memory. Why? Is there any way you
> can see if the UBC has borrowed memory from the VM?
> Isn't this bad for the system? I mean, if the UBC needs to borrow
> memory from the VM, doesn't this happen when the system has no more
> physical memory left?

> I am confused, any help would be greatly appreciated.

Hi,

According to the tuning course:
"The ubc_borrowpercent attribute determines the point beyond which the
UBC is considered to be borrowing pages from the VM side. When the free
list gets low, these loans are called back in to replenish the free page
list. (...)  Once the UBC is brought down to ubc_borrowpercent, pages
are claimed from the UBC and from VM side in order to replenish the FPL".

In practice, if the UBC extends beyond ubc_borrowpercent, it will never
get shrinked below ubc_borrowpercent, even if it will be big demand of VM.

In one of my system we use such values:
ubc_minpercent=10
ubc_borrowpercent=20
ubc_maxpercent=60
the values are (in my opinion, confirmed by performance) the best. But!
We have the system with 16GB of RAM, where the application and users use
up to 9GB, the rest is the UBC. During the EOD, we use memory almost at
all for UBC purposes (60%). The greater values of borrowpercent and
maxpercent (with this value of physical memory) cause strong performance
loss.

Best greetings:
        TYlut

--
?ukasz Tylutki, Gdynia, Poland.

 
 
 

1. PARAM 3/4: PARAM() support in modules.

"One-liner" to enable PARAM() support in modules.

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

Name: Parameter Implementation for modules
Author: Rusty Russell
Status: Tested on 2.5.38
Depends: Module/param.patch.gz

D: This activates parameter parsing for PARAM() declarations in modules.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .31807-linux-2.5.43/kernel/module.c .31807-linux-2.5.43.updated/kernel/module.c
--- .31807-linux-2.5.43/kernel/module.c 2002-10-18 17:17:25.000000000 +1000

 #include <linux/fcntl.h>
 #include <linux/rcupdate.h>
 #include <linux/cpu.h>
+#include <linux/params.h>
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>

        if (err < 0)
                goto cleanup;

-#if 0 /* Needs param support */
-       /* Size of section 0 is 0, so this works well */
+       /* Size of section 0 is 0, so this works well if no params */
        err = parse_args(mod->args,
                         (struct kernel_param *)

                         NULL);
        if (err < 0)
                goto cleanup;
-#endif

        /* Get rid of temporary copy */
        vfree(hdr);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Slackware : Upgrading to glibc-2

3. Purpose of the '.IX' tags in manual pages?

4. Q:No CDROM. Installation Method? (RH5.1)

5. How is initrd used in lilo.conf stanzas and what's it's purpose?

6. Slow Drives

7. Purpose of -s flag for command 'du' ?

8. device-driver question

9. Bootup param's

10. What's the purpose of Mistmatched Striped Groups?

11. What's the purpose of set-group ID bit for directories?

12. Script required: ATA66/UDMA2 HD Boot Param's

13. What's the purpose of MM_CHARSET?