5

I have some Trac installations running on my Ubuntu/Apache web server and I've noticed that when I monitor the CPU usage while accessing Trac pages that it is not uncommon for the CPU to spike up to a 100%. It concerns me that this happens with just one user accessing the system.

Is there a way I can make accessing Trac on my web server less CPU intensive?

5 Answers 5

3

I have found mod wsgi to be faster than mod python.

I posted a writeup on how to setup Trac with mod_wsgi here

2
  • Good effort. I will give it go and see what happens. Thanks for the good write up!
    – Luke
    Jun 29, 2009 at 11:52
  • I also changed from mod_python to wsgi (debian/etch -> debian/lenny) because of performing issuses.
    – ThorstenS
    Jul 26, 2009 at 19:56
2

For information: There's a discussion about that point at http://trac.edgewall.org/ticket/7490. They are referring to performance issues with KeepAlive in Apache2.x with mod_python.

Quoted from follow up 17: with keepalive on we got constant 80% CPU utilization on our server with keepalive off we got constant 15% CPU utilization on our server CPU load comes from Apache processes

2
  • I tried switching between KeepAlive On and Off but I do not see much difference.
    – Luke
    Jun 27, 2009 at 4:03
  • 2
    @Luke Why did you accept this as the answer then?
    – Scott
    Dec 21, 2009 at 18:04
1

There was also a similar question on the Trac ML, probably it help you (in particular the last mail with a possible configuration of Apache): ML Mail (Google Groups) " Trac 0.11 so slow!!!!!"

Edit Probably, but as I didn't have such problems, this could be also from interest for you: performance and garbage collection. However, I don't think this is the case here...

Edit #2 Just remembered that with the next stable release the performance problem will be gone (if it is because of mod_defleat). See also the Dev-ML: Preparing next stable release (first point after the "However...")

1

If you have mod_deflate enabled, try disabling it.

1
  • It made some difference but not much.
    – Luke
    Jun 26, 2009 at 22:24
1

It also depends on your database. Which database server are you using? Is it on the same host as your Trac server? Are you sure the CPU usage is coming from Apache?

Personally I've found trac runs better on mod_fastcgi, and even better on mod_wsgi. We're using a VM on a modestly spec'd VM host to host our Trac instance and it's in constant use (as in being refreshed every few seconds) by around 20 employees without any problems.

1
  • I'm using the default SQLite set up. I'm using htop to monitor the CPU usage on the server and I can see the Apache thread spike up.
    – Luke
    Jun 26, 2009 at 22:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .