Project

General

Profile

« Previous | Next » 

Revision 46a989ce

Added by Warren Baker almost 11 years ago

Indent here as well

View differences:

etc/inc/unbound.inc
40 40
    global $config;
41 41

  
42 42
    $optimization_settings = array();
43
    
43

  
44 44
    /* 
45 45
     * Set the number of threads equal to number of CPUs.
46 46
     * Use 1 to disable threading, if for some reason this sysctl fails.
......
50 50
        $optimization['number_threads'] = "num-threads: {$numprocs}";
51 51
    else
52 52
        $optimization['number_threads'] = "num-threads: 1";
53
    
53

  
54 54
    // Slabs to help reduce lock contention.
55 55
    if ($numprocs > 4) {
56 56
        $optimization['msg_cache_slabs'] = "msg-cache-slabs: {$numprocs}";
......
63 63
        $optimization['infra_cache_slabs'] = "infra-cache-slabs: 4";
64 64
        $optimization['key_cache_slabs'] = "key-cache-slabs: 4";
65 65
    }
66
    
66

  
67 67
    // Memory usage default of 4MB
68 68
    $optimization['msg_cache_size'] = "msg-cache-size: 4m";
69 69
    $optimization['rrset_cache_size'] = "rrset-cache-size: 8m";
......
431 431
    $domains = $config['unbound']['domainoverrides'];
432 432

  
433 433
    $sorted_domains = msort($domains, "domain");
434
    $result = array();      
434
    $result = array();
435 435
    foreach($sorted_domains as $domain) {
436 436
        $domain_key = current($domain);
437 437
        if (!isset($result[$domain_key]))
......
453 453
            $domain_entries .= "\tstub-prime: no\n";
454 454
        }
455 455
    }
456
    
456

  
457 457
    if ($pvt == true)
458 458
        return $domain_entries;
459 459
    else
......
596 596
            }
597 597
            break;
598 598
        default:
599
                break;
599
            break;
600 600

  
601
        }
601
    }
602 602
}
603 603

  
604 604
// Generation of Unbound statistics

Also available in: Unified diff