• 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 2 of 5 • 1, 2, 3, 4, 5

Postby mac27 » Mon Jul 09, 2007 8:14 am

haven't installed the script yet, but I've made some research on ajax/chat stuff and found that:

http://www.chabotc.nl/phpsocketdaemon/
mac27
New member
 
Posts: 1
Joined: Mon Jul 09, 2007 8:12 am
Top

Postby Beni » Tue Jul 24, 2007 6:48 pm

Just wanted you to know: run a achat with 100 chatting users in 4 rooms (JMeter simulated) on a AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ with 2Gig Ram (900M used) with a load of 12-14, but the server is not much laggy and pretty good to use (5-6 secs latency)

The nicks send a line every 1-10 secs (min max, average is therefore 5 seks)
I have several proxys doing mysql lookups running, so plain performance will be better.
Beni
Member
 
Posts: 65
Joined: Thu Sep 21, 2006 10:50 am
Top

Postby Klinky » Sat Dec 22, 2007 11:16 pm

I have found a way to improve performance if you have access to MySQL, but do not have access to shared memory or a ramdisk.

MySQL has a table type called "HEAP" or "MEMORY" which keeps the table in constant memory until the server is shutdown.

I made the following changes to mysql.class.php in the containers folder:

$cfg["mysql_fieldtype_server"] = 'varchar(32)';
$cfg["mysql_fieldtype_group"] = 'varchar(64)';
$cfg["mysql_fieldtype_subgroup"] = 'varchar(128)';
$cfg["mysql_fieldtype_leaf"] = 'varchar(128)';
$cfg["mysql_fieldtype_leafvalue"] = 'varchar(255)';
$cfg["mysql_fieldtype_timestamp"] = 'int(11)';
$cfg["mysql_engine"] = 'Memory';

The reason you have to use 'varchar' instead of 'text' is that the 'MEMORY' table type doesn't support the 'text' or 'blob' data formats. The limitation here is that leafvalue cannot be longer than the 255 character varchar limit. If you're running MySQL 5.0.3 or greater, varchar can be 16bits and will allow up to 65535 characters - unfortunately I don't have access to 5.0.3, so I also set
'$params["max_text_len"] = 200;' to lessen the chance that messages could go over the character limit. Though I am not sure how often this situation would occur in normal use where command + message is greater than 255 characters.

Your mileage may vary :)!

Edit: I did some tests and it appears MySQL will just truncate anything that occurs after character 255 if someone tries to input something greater. I think the vast majority of chat phrases will be less than 255 characters.
Last edited by Klinky on Sun Dec 23, 2007 2:06 am, edited 1 time in total.
Klinky
New member
 
Posts: 3
Joined: Sat Dec 22, 2007 10:59 pm
Top

Postby phpfreechat » Thu Dec 27, 2007 12:54 pm

Thank you Klinky for this tip. However, to complete your tip, if you don't want to modify the original source code, you just have to specify these parameters in your chat script :
Code: Select all
$params["container_cfg_mysql_fieldtype_server"] = 'varchar(32)';
$params["container_cfg_mysql_fieldtype_group"] = 'varchar(64)';
$params["container_cfg_mysql_fieldtype_subgroup"] = 'varchar(128)';
$params["container_cfg_mysql_fieldtype_leaf"] = 'varchar(128)';
$params["container_cfg_mysql_fieldtype_leafvalue"] = 'varchat(255)';
$params["container_cfg_mysql_fieldtype_timestamp"] = 'int(11)';
$params["container_cfg_mysql_engine"] = 'Memory';
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby husooz » Mon Feb 18, 2008 8:32 pm

kerphi !! did you fix the optimizing problems? can i install the script? i am using vps server and i only can use %25 cpu..
husooz
New member
 
Posts: 1
Joined: Mon Feb 18, 2008 8:17 pm
Top

Postby NatyALC » Wed Mar 05, 2008 7:30 pm

Have anyone tried to adapt PCF to use memcache to improve performance?

If you don't know, memcache is a distributed and volatile RAM storage engine.
http://www.danga.com/memcached/
Last edited by NatyALC on Wed Mar 05, 2008 7:33 pm, edited 1 time in total.
NatyALC
New member
 
Posts: 6
Joined: Wed Mar 05, 2008 7:23 pm
Top

Postby Sonya* » Tue Mar 11, 2008 1:03 pm

Hello,

I have the possibility to run the chat with and without mysql. I have not found the information which method is generally better for the performance? Have you any experience?

Thank you.
Sonya
New Chat on Herzlink
Sonya*
New member
 
Posts: 8
Joined: Wed Dec 26, 2007 6:58 pm
Top

Postby citricsquid » Tue Mar 25, 2008 12:14 pm

150 people overloaded my server :)
citricsquid
Member
 
Posts: 15
Joined: Mon Mar 24, 2008 5:39 am
Top

Postby OldWolf » Thu Mar 27, 2008 3:19 am

Impressive number of people. :)
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby citricsquid » Thu Mar 27, 2008 9:51 pm

It was pretty good.
I set it up in a rush for a website i am a member of, as their chat is down.
The site is in the top 500 Alexa ranked sites :3

But yeah, i didn't expect so many people, it somehow crashed my VPS haha.
Modifying the chat now, it's going to rock.

phpfreechat is ace, ily guys :D
citricsquid
Member
 
Posts: 15
Joined: Mon Mar 24, 2008 5:39 am
Top

Postby Klinky » Fri Jun 27, 2008 6:07 am

Well just as an update today I had an extreme usage case. I host www.blazersgamechat.com which is a chat site for my Portland Trail Blazers(NBA team). Today was the NBA Draft were teams select new players from college/international. At least 86 people were in the chat at one time. The chat was fine, but just about an hour ago they shutdown the script due to excessive resource usage. It had been running all day long. They have released the restriction since everyone pretty much timed out and thus usage went way down. This was on a 16 Core(4 x Q6600(4 cores each) 2.2Ghz CPUs) & 4GB of RAM. I was using the MySQL wrapper & v1.1 of phpFreeChat.

So phpFreeChat is fine if you're going to for small rooms, if you're expecting dozens or hundreds of people be prepared to have some insane system.
Last edited by Klinky on Fri Jun 27, 2008 6:10 am, edited 1 time in total.
Klinky
New member
 
Posts: 3
Joined: Sat Dec 22, 2007 10:59 pm
Top

Postby OldWolf » Sat Jun 28, 2008 9:48 pm

Well, to be clear, phpfreechat isn't meant to have so many users running on a shared server. :/

If you had a dedicated server, you probably would have been just fine. :)
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby redrum » Tue Aug 12, 2008 1:46 pm

karsten wrote: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

may i know what provider do you use for the chat?

thanks
redrum
Member
 
Posts: 16
Joined: Fri Jul 11, 2008 11:31 am
Top

Postby redrum » Tue Aug 12, 2008 1:49 pm

roschler wrote:Kerphi,

Do you think 5 to 10 users in a single chatroom on a shared host will hurt anything?

im using a free hosting and it goes fine for 10 users, but when it goes beyond 10 users
the server lagged..
Last edited by redrum on Tue Aug 12, 2008 2:04 pm, edited 1 time in total.
redrum
Member
 
Posts: 16
Joined: Fri Jul 11, 2008 11:31 am
Top

Postby OldWolf » Wed Aug 13, 2008 4:50 am

That's unsurprising for free hosting...
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

PreviousNext

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

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 10 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