Building a web server

chieftang

Member
Nov 11, 2005
72
0
0
Probably not the sexiest post, but here goes anyhow.... I'm putting together a linux web server on the cheap. It'll run apache, and perl and will need to perform cpu intensive JPG image manipulation on the fly. It'll just be connected to the network without keyboard/monitor and I'll access it through SSH.

The budget is fairly low, and this is what I've put together so far. I'd like suggestions for improvement, if there are any in the same general price range.

Already have a spare 200GB Maxtor Diamondmax Ultra PATA drive, and a spare CD-ROM or two.

System from newegg is as follows:

Rosewill steel case (will discard the PSU)
Gigabyte GA-K8U-939 motherboard (no need to overclock)
Thermaltake 430W PSU (to replace the Rosewill)
AMD Athlon64 3000+ Venice
512MB Corsair Value Select DDR400
Vantec 120mm case fan (just going to assume included case fan is loud)

Total before shipping: $308.97
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Sounds a little low on the ram for a web server, unless the volume of requests is going to be pretty low.
 

chieftang

Member
Nov 11, 2005
72
0
0
Actually I should have mentioned that. It won't handle high volume. It'll handle requests from family and friends on a sporadic basis only.
 

piasabird

Lifer
Feb 6, 2002
17,168
60
91
I would only put one CDROM. If it is going to be on a network you should be able to load programs off the network and ftp files to the server. If you need more RAM you can always add more later. File tansfers depend quite a lot on both the speed of the network and the speed of the server. If you had a router or a switch that was gigabit between the server and the rest of the network that might speed it up a bit. However, I would not run out and buy one just fore one family until you determine you want more speed.

If you are going to use JPEG files a lot depends on getting the size of the jpeg files and the size of the images in pixels just right. This may depend on the scanner software and your ability to size the files for best use of quality, file size, and image size for the best Throughput and size. The bandwidth even if somewhat less has some limitations and affects the time it takes to load the images and transmit them over the network and then the receiving comptuer has to display the images.

One factor is the time it takes to load the images. Processor speed is important and so is the time it takes to read the images of the drive so the speed of the drive access and the amount of RAM are also key. Image manipulation can be highly dependent on the amount of RAM. For instance to edit photos and images the software might work better if you have more RAM some Image editing software runs good on about 2 gigs of RAM. However, you can edit the images on the PC and then load them to the server.
 

phisrow

Golden Member
Sep 6, 2004
1,399
0
0
I imagine that it'll be fine. If you start hitting swap, up the RAM; but you can deal with that if you come to it.
 

imported_goku

Diamond Member
Mar 28, 2004
7,613
3
0
Originally posted by: chieftang
Actually I should have mentioned that. It won't handle high volume. It'll handle requests from family and friends on a sporadic basis only.

THATS it!? Well hell dude, all you need is some donated machine from goodwill or something, not an AMD 64.... You can run a webserver off of a 486 fairly comfortably. What dictates webserver access speed is moreso the amount of ram the system has than the processor speed. A 486 server with 128MB of ram will run siginificantly faster than a PII server with 32MB of ram. Don't waste your money on this stuff, just get an old ass computer 486 or pentium is fine, just needs a lot of ram 64-128 if thats possible. PIII is overkill ESPECIALLY for what your doing.
 

phisrow

Golden Member
Sep 6, 2004
1,399
0
0
He did mention that there will be some server side image manipulation going on. You are probably correct in saying that he could use a lesser CPU; but I doubt ye olde 486 would be good enough. Perhaps OP could describe in more detail what he plans to do? If some cgi script is going to fiddle with imagemagik on a 200k .png twice a day, he really ought to get a bottom of the line Sempron or something. If he is planning to build a browser based Photoshop clone that performs all operations on the server side, this CPU is probably a good idea.
 

chieftang

Member
Nov 11, 2005
72
0
0
Yes, phisrow. Server side image manipulation is the key. I'm currently running on an older Celeron 1.3GHz and it's just too slow for what I'm doing. I am using the perl API to imagemagick to resize full resolution images on the fly. It also does a touch of sharpening, and beautifcation such as creating borders, etc. The only image stored on the web server itself is the full res image, and all the thumbnails, small, medium, large image views that are offered by the web pages are generated on a per request basis - but never stored to disk. Images are simply resized and piped to STDOUT from the cgi script. The thumbnails alone currently take almost 1 second each to generate on my old Celeron. This is unacceptable when you're dealing with pages that might easily have 100 thumbnails to display. If I can get that down to about .25s or so, it should be fine

Editted: My current web server is a Celeron - not a P3 as previously stated. I had forgotten. :)
 

chieftang

Member
Nov 11, 2005
72
0
0
Also, I've been toying with the idea of maintaining an image cache on disk that grows each time a resize request for an image not currently cached comes in. I would then monitor available disk space, and flush the cache once it exceeded some high water mark. But I don't really want to do that unless I find it absolutely necessary..... The better scenario is to have a fast enough CPU so that a cache isn't needed. :)
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I still say put another 512m in. It's cheap, and you'll see a big difference in performance in my opinion. Windows alone can take 512m, and if you are going to run a web server and potentially some database software you'll need more.
 

chieftang

Member
Nov 11, 2005
72
0
0
Hi, Mark,

This will be a Linux (Debian) machine. I'll start with 512, and do some tests to see what it it'll take to make it start swapping and then decide if another 512 (or even another 1.5G) is needed. I'll probably set it up with at least 8G of swap space.
 

chieftang

Member
Nov 11, 2005
72
0
0
Originally posted by: thekillerjks
Here is the Opteron 140 $136 shipped.

Sorry s940

I have to stay in socket 939 to get the motherboard I want. And it looks like the s939 Opterons are a significant step up in price. Perhaps a good upgrade path in the future, though.
 

imported_goku

Diamond Member
Mar 28, 2004
7,613
3
0
Why can't the OP just do this "manipulation" on some other system? Shouldn't a server be dedicated and not have processes like this to slow it down?