PHP agent on AWS Fargate: performance issue

Hi,

I am running a PHP application on AWS/ECS on ec2 instances. I use newrelic apm for many years, and I love it. We want to move to AWS Fargate. We have noticed quite a poor performance of our application running with fargate. If we disable the new relic agent, the load drops by 70%. I moved the newrelic daemon to a separate docker image, but it did not help. Could you give me an advice what could be wrong?

Thank you.

Hi @david2

Thank you for loving New Relic :slight_smile:

Sorry for the delay to answer you.

I’m wondering if you could share the following information about your server:


  • What clock sources are being used?

    • cat /sys/devices/system/clocksource/clocksource0/available_clocksource
  • What clock source is being used?

    • cat /sys/devices/system/clocksource/clocksource0/current_clocksource.
  • What kind of timestamp counter is supported by the CPU?

    • cat /proc/cpuinfo | grep tsc
  • Is vDSO enabled?

    • strace php -m 2>&1 | grep gettimeofday

thanks

Rodrigo

Hello @rcorgozinho We’ve been experiencing this very same issue. Could you help us along please?

Here are the outputs:
cat /sys/devices/system/clocksource/clocksource0/available_clocksource:
kvm-clock tsc acpi_pm

cat /sys/devices/system/clocksource/clocksource0/current_clocksource:
kvm-clock

cat /proc/cpuinfo | grep tsc:
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves ida arat pku ospke

strace php -m 2>&1 | grep gettimeofday:
–no output–

@david2 did you get it fixed in this meanwhile by any chance?

Thanks again!

1 Like

I have just lowered monitored details.
newrelic.transaction_tracer.enabled = false
newrelic.transaction_tracer.detail = 0
newrelic.transaction_tracer.slow_sql = false

Thanks for sharing that @david2 but with this approach it won’t be useful as we need most of those features enabled.

@rcorgozinho any updates on this?

Hi @pfagiani

Welcome to our Explorers Hub! Also thank you for the message.

So, recently we found that it is not possible to change the clocksource on AWS Fargate, as you can check [here] on this AWS GitHub issue.

But as per ths:

kvm-clock is enabled and if I’m not wrong it supports vDSO.

Were you able to change it on AWS Fargate?

thanks

Rodrigo

A post was split to a new topic: PHP configure AWS ECS on the EC2 instance