This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Only 1 core being used.

I am using Astaro on an Intel i5 System on a 120Mb/s downstream connection. 

When doing heavy downloads (ie steam) i noticed that "snort-Inline" was pegging the CPU at 99% and was limiting my download speed. 

If i disable intrusion protection I am able to get download speeds in steam around 14.5 MBytes/s where as with Intrusion protection enabled I only get around 8 or 9 MBytes/s  

after some more investigation using "top" from the command line it seemed that only one tread is available, as no process will ever jump over 100% during heavy load

The CPU I am using is 4Core/thread, but /proc/cpuinfo only shows one thread available

Firewall:/home/login # cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
stepping        : 7
microcode       : 0x28
cpu MHz         : 2893.214
cache size      : 6144 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5786.42
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

Firewall:/home/login #


How can I make Astaro use all 4 cores?


Thanks, 
Mark.


This thread was automatically locked due to age.
Parents
  • Hi, 

    Thanks for getting back to me. 

    How many instances does snort usually make? I was half expecting to see 1 per available thread. 

    Firewall:/home/login # ps aux | grep snort
    snort     3377  0.0  1.6 115472 67140 ?        S



    Im not sure why cat /proc/cpuinfo only shows one cpu though, normally every linux machine I run that on it outputs one "CPU" per thread, so I should be seeing 4? 


    Im not sure what the "max_cpus limit 0" refers to, is that some sort of restriction on my licence?

    Firewall:/home/login # dmesg | grep -i cpu 
    [    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
    [    0.000000] Processor #0 (Bootup-CPU)
    [    0.000000] smpboot: 4 Processors exceeds max_cpus limit of 0
    [    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
    [    0.000000] setup_percpu: NR_CPUS:32 nr_cpumask_bits:32 nr_cpu_ids:1 nr_node_ids:1
    [    0.000000] PERCPU: Embedded 26 pages/cpu @ffff88011fa00000 s77504 r8192 d20800 u2097152
    [    0.000000] pcpu-alloc: s77504 r8192 d20800 u2097152 alloc=1*2097152
    [    0.000000] pcpu-alloc: [0] 0 
    [    0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000]  RCU restricting CPUs from NR_CPUS=32 to nr_cpu_ids=1.
    [    0.001278] CPU: Physical Processor ID: 0
    [    0.001280] CPU: Processor Core ID: 0
    [    0.001288] mce: CPU supports 9 MCE banks
    [    0.001300] CPU0: Thermal monitoring enabled (TM1)
    [    0.004591] Brought up 1 CPUs
    [    0.446900] cpuidle: using governor ladder
    [    0.446919] cpuidle: using governor menu
    [    2.824096] microcode: CPU0 sig=0x206a7, pf=0x2, revision=0x28
    Firewall:/home/login # 



    Thanks again, 
    Mark.



    edit: 

    This line caught my attention it looks like smp has been disabled with the nosmp boot option. 

    [    0.000000] Command line: root=/dev/disk/by-label/root vga=791 rootflags=data=ordered nosmp noapic acpi=off splash=silent 


    Going to try editing my boot.list and see if removing the nosmp option helps.



    edit:

    removing nosmp from my /boot/grub/menu.lst file seems to have gotten the extra cores to show up now.


    loginuser@Firewall:/home/login > cat /proc/cpuinfo 
    processor : 0
    vendor_id : GenuineIntel
    cpu family : 6
    model : 42
    model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
    stepping : 7
    microcode : 0x28
    cpu MHz : 2893.690
    cache size : 6144 KB
    physical id : 0
    siblings : 4
    core id : 0
    cpu cores : 4
    apicid : 0
    initial apicid : 0
    fpu : yes
    fpu_exception : yes
    cpuid level : 13
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
    bogomips : 5787.38
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    processor : 1
    vendor_id : GenuineIntel
    cpu family : 6
    model : 42
    model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
    stepping : 7
    microcode : 0x28
    cpu MHz : 2893.690
    cache size : 6144 KB
    physical id : 0
    siblings : 4
    core id : 1
    cpu cores : 4
    apicid : 2
    initial apicid : 2
    fpu : yes
    fpu_exception : yes
    cpuid level : 13
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
    bogomips : 5787.38
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    processor : 2
    vendor_id : GenuineIntel
    cpu family : 6
    model : 42
    model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
    stepping : 7
    microcode : 0x28
    cpu MHz : 2893.690
    cache size : 6144 KB
    physical id : 0
    siblings : 4
    core id : 2
    cpu cores : 4
    apicid : 4
    initial apicid : 4
    fpu : yes
    fpu_exception : yes
    cpuid level : 13
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
    bogomips : 5787.38
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    processor : 3
    vendor_id : GenuineIntel
    cpu family : 6
    model : 42
    model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
    stepping : 7
    microcode : 0x28
    cpu MHz : 2893.690
    cache size : 6144 KB
    physical id : 0
    siblings : 4
    core id : 3
    cpu cores : 4
    apicid : 6
    initial apicid : 6
    fpu : yes
    fpu_exception : yes
    cpuid level : 13
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
    bogomips : 5787.38
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    loginuser@Firewall:/home/login > 



    and now when doing heavy downloads snort is able to use more resources.
    currently downloading in steam at 14MB/s and web browsing is still responsive [:)] 

    top - 15:29:53 up 36 min,  1 user,  load average: 1.85, 1.05, 0.67
    Tasks: 141 total,   3 running, 136 sleeping,   0 stopped,   2 zombie
    Cpu(s): 38.1%us,  2.2%sy,  0.0%ni, 56.6%id,  0.7%wa,  0.0%hi,  2.4%si,  0.0%st
    Mem:   3961284k total,  2264972k used,  1696312k free,    61512k buffers
    Swap:  1048572k total,        0k used,  1048572k free,   977464k cached

      PID USER      PR  NI  VIRT  RES  SHR S   %CPU %MEM    TIME+  COMMAND                                                                  
     4081 snort     19  -1  144m 107m 2368 R     86  2.8   2:40.08 snort_inline                                                              
     4082 snort     19  -1  145m 107m 2352 R     73  2.8   3:08.72 snort_inline                                                              
     6725 httpprox  20   0  907m 607m 9088 S      8 15.7   0:29.21 httpproxy                                                                 
     2459 root      20   0  7064 3136 1736 S      1  0.1   0:06.54 syslog-ng        


    Im gonna have to keep an eye on this to see if enabling smp had any other unexpected effects, as I assume it was disabled for a reason.
Reply
  • Hi, 

    Thanks for getting back to me. 

    How many instances does snort usually make? I was half expecting to see 1 per available thread. 

    Firewall:/home/login # ps aux | grep snort
    snort     3377  0.0  1.6 115472 67140 ?        S



    Im not sure why cat /proc/cpuinfo only shows one cpu though, normally every linux machine I run that on it outputs one "CPU" per thread, so I should be seeing 4? 


    Im not sure what the "max_cpus limit 0" refers to, is that some sort of restriction on my licence?

    Firewall:/home/login # dmesg | grep -i cpu 
    [    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
    [    0.000000] Processor #0 (Bootup-CPU)
    [    0.000000] smpboot: 4 Processors exceeds max_cpus limit of 0
    [    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
    [    0.000000] setup_percpu: NR_CPUS:32 nr_cpumask_bits:32 nr_cpu_ids:1 nr_node_ids:1
    [    0.000000] PERCPU: Embedded 26 pages/cpu @ffff88011fa00000 s77504 r8192 d20800 u2097152
    [    0.000000] pcpu-alloc: s77504 r8192 d20800 u2097152 alloc=1*2097152
    [    0.000000] pcpu-alloc: [0] 0 
    [    0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000]  RCU restricting CPUs from NR_CPUS=32 to nr_cpu_ids=1.
    [    0.001278] CPU: Physical Processor ID: 0
    [    0.001280] CPU: Processor Core ID: 0
    [    0.001288] mce: CPU supports 9 MCE banks
    [    0.001300] CPU0: Thermal monitoring enabled (TM1)
    [    0.004591] Brought up 1 CPUs
    [    0.446900] cpuidle: using governor ladder
    [    0.446919] cpuidle: using governor menu
    [    2.824096] microcode: CPU0 sig=0x206a7, pf=0x2, revision=0x28
    Firewall:/home/login # 



    Thanks again, 
    Mark.



    edit: 

    This line caught my attention it looks like smp has been disabled with the nosmp boot option. 

    [    0.000000] Command line: root=/dev/disk/by-label/root vga=791 rootflags=data=ordered nosmp noapic acpi=off splash=silent 


    Going to try editing my boot.list and see if removing the nosmp option helps.



    edit:

    removing nosmp from my /boot/grub/menu.lst file seems to have gotten the extra cores to show up now.


    loginuser@Firewall:/home/login > cat /proc/cpuinfo 
    processor : 0
    vendor_id : GenuineIntel
    cpu family : 6
    model : 42
    model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
    stepping : 7
    microcode : 0x28
    cpu MHz : 2893.690
    cache size : 6144 KB
    physical id : 0
    siblings : 4
    core id : 0
    cpu cores : 4
    apicid : 0
    initial apicid : 0
    fpu : yes
    fpu_exception : yes
    cpuid level : 13
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
    bogomips : 5787.38
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    processor : 1
    vendor_id : GenuineIntel
    cpu family : 6
    model : 42
    model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
    stepping : 7
    microcode : 0x28
    cpu MHz : 2893.690
    cache size : 6144 KB
    physical id : 0
    siblings : 4
    core id : 1
    cpu cores : 4
    apicid : 2
    initial apicid : 2
    fpu : yes
    fpu_exception : yes
    cpuid level : 13
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
    bogomips : 5787.38
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    processor : 2
    vendor_id : GenuineIntel
    cpu family : 6
    model : 42
    model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
    stepping : 7
    microcode : 0x28
    cpu MHz : 2893.690
    cache size : 6144 KB
    physical id : 0
    siblings : 4
    core id : 2
    cpu cores : 4
    apicid : 4
    initial apicid : 4
    fpu : yes
    fpu_exception : yes
    cpuid level : 13
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
    bogomips : 5787.38
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    processor : 3
    vendor_id : GenuineIntel
    cpu family : 6
    model : 42
    model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
    stepping : 7
    microcode : 0x28
    cpu MHz : 2893.690
    cache size : 6144 KB
    physical id : 0
    siblings : 4
    core id : 3
    cpu cores : 4
    apicid : 6
    initial apicid : 6
    fpu : yes
    fpu_exception : yes
    cpuid level : 13
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
    bogomips : 5787.38
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    loginuser@Firewall:/home/login > 



    and now when doing heavy downloads snort is able to use more resources.
    currently downloading in steam at 14MB/s and web browsing is still responsive [:)] 

    top - 15:29:53 up 36 min,  1 user,  load average: 1.85, 1.05, 0.67
    Tasks: 141 total,   3 running, 136 sleeping,   0 stopped,   2 zombie
    Cpu(s): 38.1%us,  2.2%sy,  0.0%ni, 56.6%id,  0.7%wa,  0.0%hi,  2.4%si,  0.0%st
    Mem:   3961284k total,  2264972k used,  1696312k free,    61512k buffers
    Swap:  1048572k total,        0k used,  1048572k free,   977464k cached

      PID USER      PR  NI  VIRT  RES  SHR S   %CPU %MEM    TIME+  COMMAND                                                                  
     4081 snort     19  -1  144m 107m 2368 R     86  2.8   2:40.08 snort_inline                                                              
     4082 snort     19  -1  145m 107m 2352 R     73  2.8   3:08.72 snort_inline                                                              
     6725 httpprox  20   0  907m 607m 9088 S      8 15.7   0:29.21 httpproxy                                                                 
     2459 root      20   0  7064 3136 1736 S      1  0.1   0:06.54 syslog-ng        


    Im gonna have to keep an eye on this to see if enabling smp had any other unexpected effects, as I assume it was disabled for a reason.
Children
No Data