From 181fe4144e00e269ddc9471712a312d0ad4c8ab8 Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Sun, 11 Mar 2007 06:58:12 +0000 Subject: [PATCH] Add project about avoiding syscall overhead for some userland requests such as setproctitle(). Suitable for SoC with right mentor. Submitted by: kris Additional text by: rwatson --- en/projects/ideas/ideas.xml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/en/projects/ideas/ideas.xml b/en/projects/ideas/ideas.xml index 8c893e4c92..ae519b8e43 100644 --- a/en/projects/ideas/ideas.xml +++ b/en/projects/ideas/ideas.xml @@ -15,7 +15,7 @@ Ideas//EN" - $FreeBSD: www/en/projects/ideas/ideas.xml,v 1.4 2007/03/10 07:37:44 murray Exp $ + $FreeBSD: www/en/projects/ideas/ideas.xml,v 1.5 2007/03/10 10:12:44 joel Exp $ @@ -630,6 +630,38 @@ be used without kernel symbols to analyze the failure mode.

+ + + + + Avoiding syscall overhead + + +

Technical contact: Kris Kennaway

+ +

setproctitle() calls are a serious + performance bottleneck in a default pgsql configuration (they are + called at least once per query, which might be thousands of times per + second - I measured a performance impact of about 33% on sysbench).

+ +

One idea for avoiding the syscall (and global sysctl lock) overhead + for this kind of thing would be a memory page shared between kernel + and userland which libc could read/write to access things like the + process title. There are potentially many other data values that + could be optimized by a similar method. This is presumably a well + established technique in other OSes.

+ +

This project requires mentoring/review/planning with someone with + significant VM experience to make sure this approach + works properly. Done incorrectly, this could result in fairly + massive security holes, performance issues (perhaps not visible in + simple benchmarks), etc.

+ +

Requirements:

+
    +
  • Strong knowledge of C.
  • +
  • Understanding of kernel VM.