Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Which Hardware Upgrade

Status
Not open for further replies.

mrimagepueblo

Programmer
Dec 15, 2003
52
US
Don't laugh... I'm stuck with a perl program that searches a flat file database and I'm wanting to upgrade my existing server or go up a notch in performance but not really sure what performance increase if any I'll get.
I find that it only takes aproximately 5-10 seconds to search a database with 25,000 records, with a file size of approx 17mb. The system I have now is a Pentium 4-3.2ghz with 1gb ram memory. If I increase it to 2gb or 4gb do you think I would see any decrease in search response time? If so, do you think it would be significant? If I went to a Dual 3.2ghz Xeon Processor with 2gb of ram do you think the response time would be greatly improved? I get about 2500 users a day to the site, so when I run a top command, I often see the program running a number of times.
Any thoughts would greatly be appreciated.
 
Convert the flat file database to a SQL database like MySQL, and that machine's a blinder.

You're probably experiencing I/O bottlenecks rather than RAM or CPU limitations.

MySQL, it's easy, really

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Assuming you aren't running much else on the box, I doubt if you'd see much improvement with the RAM increase, although the dual processor would help as it would allow multiple instances to run on separate processors.

However, what kind of search are you doing? With a 'real', properly indexed database backing your site rather than flat files, you would expect sub-second responses on all your queries. This would give you speed improvements of one or two orders of magnitude without upgrading your kit. It would be a lot more scaleable, too.



Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
I should have mentioned the SQL thing. I know that would probably make a huge difference on speed. I'm stuck at the moment, no real available time to learn SQl at the moment, then their is a ton of codes stuck in one field that I convert to actual descriptions at the time I display the search results.
I have many different databases that get searched, running seperate instances of the programs for each client. So when the db is searched it is a seperate perl program searching a particular database.
When I watch the TOP command, when the larger databases are searched I can see the CPU utilization go to 99% and it lasts the 5 seconds until the results are displayed. I notice that this can happen simultaneously on a number of searches and then of course the CPU utilization goes away. All the time the LOAD Average never goes over 2%.
Given no real time to learn, I would rather throw more cpu speed or ram at it. Just not sure which. Ultimately I need to get with the rest of the world and convert to SQL. Like I mentioned, it's just not really an option at the moment.
 
false economy IMO, and either will yield little to no real time improvement if IO is the bottleneck

just my 0.02c
--Paul

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top