Hi, I’ve got openSUSE 11 running on my computer, and It’s completely and succesfully set up to be a server, so that’s what my question won’t be about ;). I’ve got apache 2 running on my server, but when I visit my own pages, the process translating the php code to normal html code only uses 8% of my CPU, and will never get past that 8%. Is there any way I can say, go on and use like 50% of my CPU? I’m quite new to openSUSE and couldn’t find anything using google, I hope you can help me
superdude00 schrieb:
> I’ve got apache 2 running on my server, but when I visit my
> own pages, the process translating the php code to normal html code only
> uses 8% of my CPU, and will never get past that 8%. Is there any way I
> can say, go on and use like 50% of my CPU?
You’ll have to find out what’s preventing your CPU from doing more work.
More likely than not it’s spending its time waiting for disk I/O, so one
way of increasing CPU load would be to buy faster disks. Another one
would be adding lots of RAM so more of the disk data would be cached.
Hi, thanks for the reply, but the file I’m trying to write is about 20MB in size, so I don’t think the disks are the problem. I’ve got about 400MB of RAM and the script I’m executing is not that big, so I’m not sure if that’s the problem either. Are you sure you can’t set a process its maximum cpu usage somewhere? Because the CPU used by the process never gets above exactly 8%.
superdude00 schrieb:
> Hi, thanks for the reply, but the file I’m trying to write is about 20MB
> in size, so I don’t think the disks are the problem.
I don’t quite follow you. What file are you trying to write when the
web page is requested?
Anyway, file size is not everything. There’s also the cost of looking
up the file in the directory, network overheads, etc. Generally speaking,
if your CPU is less than 100% occupied, it’s because it’s waiting for
something else.
> Are you sure you can’t set a process
> its maximum cpu usage somewhere? Because the CPU used by the process
> never gets above exactly 8%.
Pretty sure. I’ve been using Linux for about 15 yrs now and I never
encountered such a thing. None of the processes I ever started had
a problem maxing out at 100% CPU once all I/O obstacles had been
moved out of the way.