• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Performance ... your experience ?

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
72 posts • Page 1 of 5 • 1, 2, 3, 4, 5

Postby hpatoio » Wed May 10, 2006 4:12 pm

Have you ever had performance problems because of the high number of user ?

Which was the highest number of user you had in your chat ?
Can you approximately tell me how many message there were in the channel ?

I'm just wondering how scalable phpFreeChat is ... and how much load can it support !

Simone
hpatoio
New member
 
Posts: 2
Joined: Tue May 02, 2006 10:13 am
Top

Postby phpfreechat » Wed May 10, 2006 5:00 pm

I can only make suppositions based on my real time watching (using the top command):
- phpfreechat is not CPU consuming.
- but RAM is a critical ressource because. By default one user do a http request each 5 seconds so it requires 1 apache thread for 5 users. Moreover, 1 apache thread is about 8Mo on my system (maybe it can be reduced with fine tunned configuration), so if there is 100 concurent users it will eat 100/5 = 20 threads ie 20*8 = 160 Mo of RAM.

However I think it's a good idea to look at lightweight webserver for high trafic.
And maybe a dedicated server for chatting.
But offcourse, it depends on number of concurent users.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby roschler » Tue Oct 24, 2006 7:15 pm

Kerphi,

Do you think 5 to 10 users in a single chatroom on a shared host will hurt anything?
roschler
Member
 
Posts: 23
Joined: Thu Oct 19, 2006 6:44 pm
Top

Postby phpfreechat » Tue Oct 24, 2006 7:23 pm

just try, I don't know your server details so I'm unable to answer... however you can tune the "max_delay" parameter if you have problems with server overload.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby karsten » Thu Oct 26, 2006 3:49 pm

Hello,

I have just installed PFC at my Website www.karsten-hens.de and have been with a whole schoolclass of 28 pupils at the same time in the chat. There have been no problems with the performance. Everybody has been logged in without big problems. I didn't expect this.

Congratulations and thank you!!! :-)

karsten
karsten
New member
 
Posts: 7
Joined: Thu Oct 26, 2006 3:38 pm
Location: Germany
  • Website
Top

Postby max » Thu Dec 07, 2006 1:43 am

I am worry about performance, with 4 channels open and with over 10 concurrent users we have seen levels of 50% usage of CPU with a dedicated server.

Have you done real test of how many concurrent users have used the chat?
max
New member
 
Posts: 6
Joined: Thu Dec 07, 2006 1:39 am
Top

Postby phpfreechat » Thu Dec 07, 2006 3:13 pm

to optimize cpu consumption, you have several solutions :
1- store the data in RAMDISK : http://www.phpfreechat.net/faq.en.html#tmpfs
2- increase the 'refresh_delay' parameter, example : $params['refresh_delay'] = 10000; // 10 seconds

anyway all these tunning depend on your hardware.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby max » Fri Dec 08, 2006 2:49 am

We are using the ramdisk option.

We will change the refresh delay to see if there is any difference.

Are any other changes that we can made to have a better perfomance.

We have seen a top usage of 50% CPU with very few users on a dedicated server with 2GB of ram and a Intel Pentium 3ghz, on average the CPU is between 15% and 5% with less than 15 concurrent users.

The load average of the server is very low: 0.37, 0.41, 0.28

Changing the delay what is going to be the difference?
max
New member
 
Posts: 6
Joined: Thu Dec 07, 2006 1:39 am
Top

Postby phpfreechat » Fri Dec 08, 2006 9:09 am

Changing the delay will decrease number of http request.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Nightf!y » Fri Dec 15, 2006 8:01 pm

How can I improve the performance of my installation? I have noticed that the chat hangs sometimes & in order to solve the problem I have had to manually clear the cache. Of course, this is a bit time consuming and lacks practicality since I can't monitor the chatroom continuously. My webserver does not support the TMPFS (SHMFS) so I can't use that. Is there any configuration directive I can use to automate the process of keeping the cache light so that no hanging will occur?
Nightf!y
New member
 
Posts: 7
Joined: Tue Nov 14, 2006 3:41 pm
Top

Postby !ChrisSampson » Sat Jan 06, 2007 12:07 pm

I never had any performance problems but sounds like you got it fixed. :)
!ChrisSampson
New member
 
Posts: 2
Joined: Sat Jan 06, 2007 12:04 pm
  • Website
Top

Postby gaouzief » Mon May 28, 2007 1:48 pm

w've had a test (1;0 BETA 10) on a dedicated Dual Core , 2GIG Ram, SCSI discs,

At 50 concurrent users, RAM usage was still very low (300 Megs) but load average skyrocketed (Over 6 at peak) and cpu was being eaten away 80 - 90 % all the time, and the whole thing was lagging on the client's side, it didn't feel very good on the interface (delays, freezes....) not to mention the scroll bug issues being multiplied due to the increasing number of messages and the leave/tiemout/nick change notices taking much of the screen (and being echoed multiple times also??), francly it was not a smooth experience for the users

So i must say, there is still a lot of things to do to enhance performance, so far, this real good piece of software on the functional side is simply not scalable, in my opinion.


I haven't loocked much at the code but it seems to me the /update commands are sent to the same url the chat is loaded from right?!? well changing that behaviour to posting to a lightweight /update.php that would not contain all that useless code is a starter,
Xajax may not be the best choise also, why not Mootools or prototype?

what messaging format is used between ajax and server? XML may not be the best choice for performance, why not go with json and use php jyson for best performance?

Cheers.

EDITED: forgot to say that there seem to be mem leaks in the JS that writes messages to the chat screen, so after a while (40 minutes) many of the tester's browsers crashed/or had to be restarted to continue chatting
Last edited by gaouzief on Mon May 28, 2007 1:50 pm, edited 1 time in total.
gaouzief
New member
 
Posts: 5
Joined: Sat May 26, 2007 1:41 pm
Top

Postby phpfreechat » Mon May 28, 2007 1:57 pm

gaouzief thank you for your report.

A agree there is a lot to optimize on client side, there is some javascript code that could be easily optimized.

I haven't loocked much at the code but it seems to me the /update commands are sent to the same url the chat is loaded from right?!? well changing that behaviour to posting to a lightweight /update.php that would not contain all that useless code is a starter,

In 1.0-beta10 and before, you can separate the ajax call in a separated script. Have a look to demo3 for an example.

Xajax may not be the best choise also, why not Mootools or prototype? what messaging format is used between ajax and server? XML may not be the best choice for performance, why not go with json and use php jyson for best performance?

In the next release 1.0-beta11 (the code is allready commited in the trunk), only prototype will be used to do ajax request. The format will also be changed and simple json+js code will be exchanged.

However, feel free to sumbit patches to optimize and simplify the code :)
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby gaouzief » Mon May 28, 2007 2:17 pm

where can we grab the code of this beta 11?

ADDED: ok, just noticed the server script option, that should be there by default in my opinion. it would correct that bug people had with IE (strange xml error alert), IE has issues managing cache and sometimes, when you post to a url using ajax it retrieves response from cache causing that issue when the server sits on the same url, because it then retrieves the whole html, wich triggers the xml error
Last edited by gaouzief on Mon May 28, 2007 2:22 pm, edited 1 time in total.
gaouzief
New member
 
Posts: 5
Joined: Sat May 26, 2007 1:41 pm
Top

Postby datacompboy » Mon May 28, 2007 5:24 pm

Mine experiments show, that on 1Gb ram pfc with refresh_delay 10 secs it hangs on about 20-25 users.
If I add 1Gb swap more it can choppy server 25-30 users.
Today I have installed eAccelerator, and it serve about 40 users without server deadlock!
But still reaction veeeery slow. Mine messages come into chat with 2-3 minutes delay, but I receive replies fast.
-- suicide proc nearn call deathn suicide endp
datacompboy
Member
 
Posts: 74
Joined: Thu Jan 18, 2007 9:10 pm
Location: Novosibirsk
  • Website
  • ICQ
Top

Next

Post a reply
72 posts • Page 1 of 5 • 1, 2, 3, 4, 5

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 18 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub