XFileSharing Pro - cgi vs php

Message
Author
fuorissimo
Posts: 32
Joined: Nov 16, 2012 5:02 pm

cgi vs php

#1 Postby fuorissimo » Nov 19, 2012 4:09 pm

Really funny. Someone have delete subject above comment.

Maybe someone can't reply and know that cgi is an obsolete language?

I try again...


Why script is in CGI e non PHP? I don't use cgi from the 2003 because create BIG OVERLOAD SERVER PROBLEM. The SAME script in PHP reduce load about 75%. So why continue to develove a script in a language obsolete, hard to configure and really expensive on server resources?

admin
Site Admin
Posts: 1839
Joined: Mar 22, 2006 12:32 pm

#2 Postby admin » Nov 19, 2012 4:53 pm

Well, if you have problems with Perl - that's your problem.

It was deleted because your topic is absolutely sensless. You want us to rewrite it to php? That will never going to happen, sorry.
Calm down, you're causing too much noise on forum, not even being a customer yet. And please stop using caps for the topic titles.

fuorissimo
Posts: 32
Joined: Nov 16, 2012 5:02 pm

#3 Postby fuorissimo » Nov 19, 2012 6:08 pm

admin wrote:Well, if you have problems with Perl - that's your problem.

It was deleted because your topic is absolutely sensless. You want us to rewrite it to php? That will never going to happen, sorry.
Calm down, you're causing too much noise on forum, not even being a customer yet. And please stop using caps for the topic titles.

Your reply is sensless, not my question. A lot of users have load problem with your script because is in cgi, and your suggest is to UPGRADE SERVER. It's a joke?

i suggest you to change almost the file that cause overload (like download, upload) from cgi in php. i don't understand why don't made this.

admin
Site Admin
Posts: 1839
Joined: Mar 22, 2006 12:32 pm

#4 Postby admin » Nov 19, 2012 6:19 pm

Show me "a lot of users"?
You're talking about things which you abosultely do not know. Users usually having disk I/O problems, but not the scripts performance issues.
There's absolutely nothing to be done with Perl vs PHP flame. Both languages have about the same performance.

By the way, topic title "cgi vs php" is not correct. CGI is a standard, while PHP is a programming language. PHP can work as a CGI script and Perl can work as a non-CGI script.

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#5 Postby trinsic » Nov 19, 2012 9:59 pm

PHP is a loosely typed language and has a sucky way of debugging.

You do have other choices as far as file hosting scripts go and I wouldn't be surprised if there were PHP ones out there but XFS isn't one of them.

PHP is a basic web language while Perl is a big number cruncher. I run 70k daily downloads off a 512MB VPS so Perl can't be that bad.

fuorissimo
Posts: 32
Joined: Nov 16, 2012 5:02 pm

#6 Postby fuorissimo » Nov 20, 2012 3:07 am

who say that cgi don't overload servers and use more (many more) resources respect php i think that live on the moon.

it's obsolete. i don't understand why use it. sorry

chrda
Posts: 296
Joined: Sep 14, 2009 7:16 pm

#7 Postby chrda » Nov 20, 2012 3:48 am

Only reason to choose php over perl is that its easier to find people doing it.

There isnt anything wrong with XFS and its code. Its powerful and stable.

Most reason why people get problems is due bad choices in hardware, usually disk setups. But also database setups.

upmaster
Posts: 16
Joined: Jan 02, 2012 10:31 pm

#8 Postby upmaster » Nov 20, 2012 1:08 pm

I did some performance test beetwin perl and php long ago. I written two scripts, one (very simple) counted to the point and then print something, the second searched specyfic files on HDD and then mail these files to me. Performance differences wasn't significant.

I wonder how significant is "licence verification process" which is run always when user request to download file (probably upload too) Maybe this is responsible for overloads ?

fuorissimo
Posts: 32
Joined: Nov 16, 2012 5:02 pm

#9 Postby fuorissimo » Nov 21, 2012 3:18 am

Most reason why people get problems is due bad choices in hardware, usually disk setups. But also database setups





Do you can let me know how setup for the best performance?

chrda
Posts: 296
Joined: Sep 14, 2009 7:16 pm

#10 Postby chrda » Nov 21, 2012 1:39 pm

Many factors, but as a general setup you can follow these guidelines.

For database cpu/disk io and enough memory to keep db in memory.
For web frontend running perl or php scripts, usually CPU
For fileservers you need disk I/O, memory and bandwidth

Database:
Quad Xeon E3-Series, 12Gb ram, HW Raid1 or HW Raid10 with SAS/SSD disks

Webserver (if single web only)
Quad Xeon E3-Series,8Gb Ram HW Raid1 SATA disks

Webserver (if multiple)
Quad Xeon E3-Series, 8Gb Ram, Single SATA disk

Fileservers:
Quad Xeon E3-Series, 16-24Gb Ram, HW Raid10 6-12x SATA disks with hotspare

Databases should be on the same switch as the webservers, fileservers can be in any location you like.
You can use one provider to give you a good deal on high performance web and database, then use fileservers with 100tb providers etc.

yikjaan
Posts: 24
Joined: Feb 27, 2009 10:20 am

#11 Postby yikjaan » Nov 25, 2012 7:13 pm

chrda wrote:Many factors, but as a general setup you can follow these guidelines.

For database cpu/disk io and enough memory to keep db in memory.
For web frontend running perl or php scripts, usually CPU
For fileservers you need disk I/O, memory and bandwidth

Database:
Quad Xeon E3-Series, 12Gb ram, HW Raid1 or HW Raid10 with SAS/SSD disks

Webserver (if single web only)
Quad Xeon E3-Series,8Gb Ram HW Raid1 SATA disks

Webserver (if multiple)
Quad Xeon E3-Series, 8Gb Ram, Single SATA disk

Fileservers:
Quad Xeon E3-Series, 16-24Gb Ram, HW Raid10 6-12x SATA disks with hotspare

Databases should be on the same switch as the webservers, fileservers can be in any location you like.
You can use one provider to give you a good deal on high performance web and database, then use fileservers with 100tb providers etc.

Chrda : Thanks for sharing :)

ufkabakan
Posts: 332
Joined: Apr 13, 2011 9:37 pm

#12 Postby ufkabakan » Nov 25, 2012 11:34 pm

@charda
How to kape SQL on memory? I tryed lot of configs but still MySQL try to write to disk some parts of data.

universe
Posts: 67
Joined: Mar 20, 2012 12:13 pm

#13 Postby universe » Nov 26, 2012 12:40 am

Try memsql.com - if you give some feedback back you will get also a larger DB than 10GB for free ;)

chrda
Posts: 296
Joined: Sep 14, 2009 7:16 pm

#14 Postby chrda » Nov 26, 2012 10:27 am

MySQL with InnoDB will write to disk on new data like inserts and updates.
Keeping everything in memory will most likely give you data loss.

You can but certain tables in memory engine, if you can risk loosing the data.

MemSQL is a solution, but its pretty new.

Alternative for MySQL single server is MySQL Galera Cluster.

I really like Galera, but you need to make sure all servers are identical and that there isn't any I/O bottlenecks.