High ram usage vista

Problems with the Windows version of XAMPP, questions, comments, and anything related.

High ram usage vista

Postby klaushundal » 27. June 2008 17:56

Hello everybody! :)

I have used xampp for a few years now and I'm very happy with it.

I only got one problem and this problem started when i got a new computer with windows vista.

The server runs fast and good when just starting the server, but for every hour the ram usage is getting higher and higher and it dosn't fall down again when I'm not using the computer. It's just keep increasing.

When the ram usage then have reached a very high value my server starts running slower, showing erros like scripts not running correctly and sometimes some images won't show.

When i close the server the ram usage fall down quickly and when i start it again it starts all over.. Ram increasing by every hour.

I don't want to restart my server all the time to make my server work properbly so figured there most be a solution to this problem.

My computer is an AMD Athlon 64 X2 Dual Core 4400+ 2.30 GHz and with 3 GB ram. (i just upgraded with 1 gb ram).
I am running windows vista home premium.

Does anybody have an idea of what could be wrong?

I would really appreciate it!

Looking forward to hear back from somebody.

Warm greetings
Klaus Hundal
klaushundal
 
Posts: 4
Joined: 02. November 2007 00:41

Postby Danodemano » 27. June 2008 19:02

I guess my first question is how heavily used is the server? I ran an online RPG for a while off an "old" Windows 2000 machine and I was literally forced to reboot daily to flush out the RAM (I even made it a scheduled task on the system). Windows, in general, does a very poor job of managing the RAM.

However, that being said, if the server is almost rarely touched, then it would seem like there is another problem there. My first suspicion would be a memory hungry script causing it. It's really hard to be able to make any guesses about things though. I would run Process Explorer to help isolate the exact process causing the load. You will need to show the "Private Bytes" column as that will show the memory usage for the processes.

If you have only had this issue with Vista, then I would tend to believe that this is a problem with the OS itself. There are a number of "security features" that wreak all sorts of havoc on Vista machines.

That's about all I got, without actually looking at the system, it's really hard to pin down the cause usually.
Dan

Image
Danodemano
 
Posts: 31
Joined: 21. September 2007 00:16
Location: Dublin, OH

Postby klaushundal » 27. June 2008 19:38

Hello Danodemano! :)

Thank you for replying.

I already have checked the system for what RAM is use and there is almost no software or processors using any ram.

In the mean time since posting this topic i tried to look at the apache conf again and the ram usage is actually fallen now. It does not get higher and higher anymore?! I strugled with this problem over a 1 year now and now it looks like it's fixed?

What i did was to write in this code: "Win32DisableAcceptEx" at the httpd-mpm conf (inside apache/conf/extra) instead of using this code in the standard httpd conf at the apache/conf directory.

I don't know if the problem is gone forever now or if it will come back again.

I was thinking about the "MaxRequestsPerChild" is set to zero in httpd conf. Could this setting also cause high ram usage?

My website is not public yet so i would like to make sure that I'm not going to experience this problem again when the website go public.

Thank you again for replying.
Looking forward to hear back from you again.

Warm greetings
Klaus
klaushundal
 
Posts: 4
Joined: 02. November 2007 00:41

Postby Danodemano » 27. June 2008 21:48

It's possible that it's related to the worker module in Apache also, check your configs on this in the httpd.conf and see what you get. I usually use something about like this:
Code: Select all
<IfModule mpm_worker_module>
    StartServers          2
    MaxClients          100
    MinSpareThreads      15
    MaxSpareThreads      25
    ThreadsPerChild      5
    MaxRequestsPerChild   0
</IfModule>

# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum  number of requests a server process serves
<IfModule mpm_winnt_module>
    ThreadsPerChild     25
    MaxRequestsPerChild   0
</IfModule>

Though that would most certainly have to be adjusted to your needs, just make sure you don't allow to many threads per child. It might be that you have to many threads open at the same time. I can't recall what the defaults are off the top of my head, but it's pretty high.

As for the Win32DisableAcceptEx, I wouldn't be sure, but I would doubt that has much to do with the RAM usage.

Someone who actually uses Vista may be able to shed some more light on this also (I killed my Vista install and went back to XP after 2 days :?).
Dan

Image
Danodemano
 
Posts: 31
Joined: 21. September 2007 00:16
Location: Dublin, OH

Postby klaushundal » 28. June 2008 17:08

Hello Dan :)

I've checked my httpd.conf and it looks like this:

Code: Select all
<IfModule mpm_worker_module>
    StartServers          2
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>

# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum  number of requests a server process serves
<IfModule mpm_winnt_module>
    ThreadsPerChild     250
    MaxRequestsPerChild   0
Win32DisableAcceptEx
</IfModule>


How do you suggest i set these settings?

And what does the "ThreadsPerChild" exactly mean among the others?

Thank you again.

Warm greetings
Klaus :)
klaushundal
 
Posts: 4
Joined: 02. November 2007 00:41

Postby Danodemano » 28. June 2008 23:19

My suggestion would be to use the configs I listed in my last post and give that a try. I think that you will find it to be at least close to what you need. You will have to tweak it to your exact needs, however, based on the number of con-current peoples you would have on your site(s). The ThreadsPerChild directive basically specifies the max number of threads that each child object is allowed to spawn.

For more info on the ThreadsPerChild directive, you can take a look at this. That URL also has details on the other directives used in that block of the conf.

Hope that helps!
Dan

Image
Danodemano
 
Posts: 31
Joined: 21. September 2007 00:16
Location: Dublin, OH


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 50 guests