1
ylw633
Performance enhancement idea
  • 2005/4/6 15:35

  • ylw633

  • Just popping in

  • Posts: 11

  • Since: 2004/2/19


As we all know, XOOPS has a powerful caching system. However, it seems although XOOPS can cache at block & module level, the system is not flexible enough to cache individual pages.

For example, with News 1.3, there are 4 blocks that user can select to cache as well as caching the whole News module. However, it will be a great feature to have if user can cache the "index.php" but not "article.php". By doing such configuration, the database query & execution time of the main page can be dramatically reduced but users still do not lose click count of each article.

Performance has been an issue with XOOPS, but I think with this little enhancement, users can have more flexibility to use the powerful caching system XOOPS has and increase performance. Is there already such thing exists?



2
ylw633
Re: Sleepless in Texas!
  • 2004/7/13 22:47

  • ylw633

  • Just popping in

  • Posts: 11

  • Since: 2004/2/19


some new update:

we now have our own dedicate server that is 2.4GHz Celeron, 512mb RAM, and 80G IDE on FreeBSD, no WHM no cpanel, so no garbage applications that comes with it. Basically it's just a FreeBSD 5.1 box that is primarily used as a web server.

I have done excessive research and have personally optimized the kernel, system parameters, MySql (4.1.3), PHP (4.3.7), Apache (1.31). All applications are compiled using optimization and Zend 2.5.1 is installed to accelerate PHP. I have tweaked every performance related parameters of Apache and increased buffer of MySql. I have configured XOOPS to cache most of the blocks thus cut database queries on our main page from 90 to 60. I have even conducted an experiment of redirecting all static file request to thttpd running on another port and let Apache only handle .php requests, though this configuration failed to boost performance as expected.

Alright, our site can handle about 150 concurrent users during peak time but still will freeze sometimes and we are stuck now.

Here are some obervations we had on XOOPS and performance tweaking.

1. turn off Keep-Alive on the server will help quite a bit
2. I think there are bugs in database access of XOOPS, during off load time it may be OK but it seems like some dead-lock or race condition will occur if some condition is met. I am not an expert of PHP so I didn't bother to look into the code, the below finding is purely based on observation of the behavior of our server.

When our server is frozen (load is more than 10), most of the Apache process is serving either main page (index.php) or news module (article.php). It seems like tow or more processes started the lock down and the lock caused new httpd and MySQL to spawn for requests coming in, eventually every httpd process is at "W" stage and eats up memory thus crippled the server. Below is a capture of Apache status.

9.65 requests/sec - 25.4 kB/second - 2699 B/request
143 requests currently being processed, 7 idle servers
W_WW_WW_WWWWWWWWWWWWWWWWWWWWWWWW_WWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWWW___..................
........................

During this stage the established TCP connection is about 100 and also about 100 MySQL is spawned as well. Basically we have eliminated the possibility of being attacked and think this problem is probably caused by XOOPS.


Since most of the resource XOOPS required is used on the generation of contents for different group of users (like module permissions), is there a functionality or module in XOOPS that can pre-generate static file (html) for all viewers (much like weblog applications)? Even doing so would pretty much abandon the flexablity of managed interface XOOPS has, however it will be a great feature to have in performance perspective.



3
ylw633
OK, here is the update
  • 2004/5/4 8:13

  • ylw633

  • Just popping in

  • Posts: 11

  • Since: 2004/2/19


finally we settled with surpasshosting.com and get their dedicated hosting plan ($99 a month, 2000GB transfer, 80G HD, Celeron 1.7GHz, 512MB mem, RedHat 9 + cpanel + WHM).

at first we thought all our problems would go away with a dedicate server and we even thought about renting out the bandwidth to others, however....

later we found out this dedicate server can't even handle our site at peak time (100 ~ 160 users from "Who's Online" module). apache keeps crashing, and the site keeps coming up and down.

i really find it amazing XOOPS can't handle our traffic with this kind of resource since our XOOPS is a very typical one and don't use a lot of modules (only FreeContent). No pconnect is used, and so far no cache is enabled.

I think XOOPS really need A LOT OF work on optimization, having 100 queries when opening up a page (news module with 10 articles per page) is really ridiculous, compare to Invision Powered Board which it only took 9.

maybe our site is the largest site that uses XOOPS? how come no one else seemed to have this kind of problem?



4
ylw633
Re: We give up
  • 2004/4/15 2:41

  • ylw633

  • Just popping in

  • Posts: 11

  • Since: 2004/2/19


too bad we are already suspended and they are unwilling to unblock, finding another host is our only option....

my post this afternoon was really out of frustration, we really want to stay with xoops, i've used postnuke but didn't really like that because its internationalization support is not as good as xoops. heck, i even digged into zope and plone! continue to use XOOPS will be our preference.

i really wonder, why would XOOPS take that much of resouce (crashing apache as MySQL as my hosting company say)? what is the optimal setting for performance? is caching really helps during peak hit hours? would pconnect helps performance on dedicate server? please advise.



5
ylw633
Re: We give up
  • 2004/4/14 21:40

  • ylw633

  • Just popping in

  • Posts: 11

  • Since: 2004/2/19


i really don't get it... just phoned my ISP, and is pretty sure we are being kicked out. one thing i don't understand is, they told me the plan we are on only has 4-10 sites sharing 1 4-CPU 1024mb linux box. how can our site that uses XOOPS (primarily news and newbb module) still screw it up?

does anybody know what's the status of the server this site runs on? how about XOOPS configuration of this site? does this site use cache? pconnect?

we now have to look for another hosting company and are thinking about sharing a dedicate machine with a few people, but to know the fact that XOOPS took too much resource on a 4 cpu machine that only has 10 sites really shock me.



6
ylw633
Re: We give up
  • 2004/4/14 18:28

  • ylw633

  • Just popping in

  • Posts: 11

  • Since: 2004/2/19


actually it's the 2nd time they suspended us, the first time was two months ago that forced us to close forum. at that time we were using 2.0.5 and was NOT using pconnect, therefore this time we thought we used 2.0.6 and enabled pconnect, as well as cache (30 seconds for news and newbb page).

i think what they say about "resource" is computing resouce, we are allowed to have 200GB/mo transfer because we paid $40 a month, and lunarpages has quite a good reputation among hosting companies so i don't think it's them who failed us.

ever since we re-opened forum, there are times cpu usage will spike up and crash httpd and mysqld.

i don't really want to abandon XOOPS because we've been enjoyed it, but it's really sad we don't have other choices...



7
ylw633
We give up
  • 2004/4/14 16:13

  • ylw633

  • Just popping in

  • Posts: 11

  • Since: 2004/2/19


today is a sad day.... we are suspended by our hosting company "lunarpages.com" because they said we used too much resource. we only use the news and newbb module, but XOOPS still can't handle our load.

xoops once again failed us, i guess we'll have to switch to postnuke, hopefully they perform better.



8
ylw633
Re: XOOPS and server load
  • 2004/4/8 21:55

  • ylw633

  • Just popping in

  • Posts: 11

  • Since: 2004/2/19


sorry for disappearing for such a long time....

eventually we closed our forum to avoid being shutdown by isp. however, we are planing to re-open it tomorrow since nba playoff is coming (our site is a basketball related site). the question i have is, what is a better configuration for XOOPS to achieve optimal performance? currently our configuration is:

1. use persistent connection
2. take out site status block (such as "who's online")
3. disable session
4. set cache on pages (still need to experiment with cache expiration time)

any other suggestions? please help. thanks!!

by the way, our site is using 2.0.6 and is athttp://www.roundballcity.com
the site is a basketball fan site that have editors contributing articles in traditional chinese about taiwanese basketball, nba, ncaa, and world basketball. the site is very famous in chinese basketball society (maybe top 5 chinese basketball fan site).



9
ylw633
Re: XOOPS and server load
  • 2004/2/20 5:43

  • ylw633

  • Just popping in

  • Posts: 11

  • Since: 2004/2/19


i think it's processor since memory utilization is no more than 50%, even swap is less than 1% on that server.



10
ylw633
Re: XOOPS and server load
  • 2004/2/20 5:09

  • ylw633

  • Just popping in

  • Posts: 11

  • Since: 2004/2/19


i thought turn on persistent connection will help performance?

since we have 150 people online at the same time wouldn't it be a lot of overhead in opening/closing connections if not using persistent connection?

please advice




TopTop
(1) 2 »



Login

Who's Online

205 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 205


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits