4 4308
FFMG wrote:
Hi,
My Hosting company is saying that I am using too much memory on the VPS
and that I should upgrade.
I am currently running at 65%-75%, (according to WHM).
It does seem a bit high, but I cannot see what could be using a lot of
memory. I have MySQL 5 and and php 4.4.
Is there any PHP code that I could use to 'check' how much memory a
script is using to run so that I could flag the problem ones?
How would you identify what process is taking large amount of memory?
FFMG
Hi,
Have a look at memory_get_usag e() at php.net.
You could try to use it to get an idea of what parts of your script take
up what amount of memory.
Just place it at strategically placed points in your script, like before
calling a heavy function, and during the function, and when it returns.
Since we don't know your script, you'll have to identify the subject
actions in the script yourself.
Hope that helps.
Good luck.
Regards,
Erwin Moller
PS: Tip: If you have a question like this, first go to www.php.net and
type it in the searchfield. (If you type 'memory' there you find this
function.)
FFMG wrote:
Hi,
My Hosting company is saying that I am using too much memory on the VPS
and that I should upgrade.
I am currently running at 65%-75%, (according to WHM).
It does seem a bit high, but I cannot see what could be using a lot of
memory. I have MySQL 5 and and php 4.4.
Is there any PHP code that I could use to 'check' how much memory a
script is using to run so that I could flag the problem ones?
How would you identify what process is taking large amount of memory?
FFMG
Are you talking about real memory or virtual memory? How much of each
do you have? And is it PHP and/or MySQL using the memory or something
else? Is this average or peak?
What are you doing in your scripts which might be memory intensive? I.e.
are you using large arrays? Graphic manipulation? Reading large files
into memory? Something else?
I regularly run 75%+ of real memory on my VPS's and they runs fine. But
I also have the systems tuned to run that way.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
Jerry Stuckle;88408 Wrote:
>
Are you talking about real memory or virtual memory? How much of each
do you have? And is it PHP and/or MySQL using the memory or something
else? Is this average or peak?
What are you doing in your scripts which might be memory intensive?
I.e.
are you using large arrays? Graphic manipulation? Reading large
files
into memory? Something else?
I regularly run 75%+ of real memory on my VPS's and they runs fine.
But
I also have the systems tuned to run that way.
Well, everything runs fine except for the WHM updates, every nights it
tries to update the system but for the life of me I cannot see what
could take so much memory, (maybe the unpacking?).
I am a windows user but my VPS is unix, so I am not sure if I am using
Virtual or real memory. And if I should allocate virtual memory or
not.
I am guessing that if I could allocate some virtual memory then the WHM
updates could run without a hitch.
The reason I ask is, last week the system went down and since then the
Hosting co is saying that it was my fault, (but I had changed nothing
in my scripts).
After complaining that they had screwed up the system and not me they
are now saying that I am using too much memory and the Updates are
crashing every morning.
I have disabled the updates for now, but i need to resolve the issue.
What are the unix commands to
- Get the virtual memory
- Get the real memory
- Set the virtual memory, (and what do you suggest it should be?)
Thanks
FFMG
--
'webmaster forum' ( http://www.httppoint.com) | 'Free Blogs'
( http://www.journalhome.com/) | 'webmaster Directory'
( http://www.webhostshunter.com/)
'Recreation Vehicle insurance'
( http://www.insurance-owl.com/other/car_rec.php) | 'Free URL
redirection service' ( http://urlkick.com/)
------------------------------------------------------------------------
FFMG's Profile: http://www.httppoint.com/member.php?userid=580
View this thread: http://www.httppoint.com/showthread.php?t=19636
Message Posted via the webmaster forum http://www.httppoint.com, (Ad revenue sharing).
FFMG wrote:
Jerry Stuckle;88408 Wrote:
>Are you talking about real memory or virtual memory? How much of each do you have? And is it PHP and/or MySQL using the memory or something else? Is this average or peak?
What are you doing in your scripts which might be memory intensive? I.e. are you using large arrays? Graphic manipulation? Reading large files into memory? Something else?
I regularly run 75%+ of real memory on my VPS's and they runs fine. But I also have the systems tuned to run that way.
Well, everything runs fine except for the WHM updates, every nights it
tries to update the system but for the life of me I cannot see what
could take so much memory, (maybe the unpacking?).
I am a windows user but my VPS is unix, so I am not sure if I am using
Virtual or real memory. And if I should allocate virtual memory or
not.
I am guessing that if I could allocate some virtual memory then the WHM
updates could run without a hitch.
The reason I ask is, last week the system went down and since then the
Hosting co is saying that it was my fault, (but I had changed nothing
in my scripts).
After complaining that they had screwed up the system and not me they
are now saying that I am using too much memory and the Updates are
crashing every morning.
I have disabled the updates for now, but i need to resolve the issue.
What are the unix commands to
- Get the virtual memory
- Get the real memory
- Set the virtual memory, (and what do you suggest it should be?)
Thanks
FFMG
You need to ask these questions in a Unix/Linux admin group.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== === This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lawrence |
last post by:
I'm not sure how this is normally done, on a large site, perhaps one
running Phorum. Occassionally a thread will have hundreds of entries,
perhaps a meg or two worth of data. You won't necessarily print all
that to the screen, but PHP has to hold it in memory. Run some
operations on it, or, more likely, have an array that you keep adding
things to, and very soon you run into the 8 meg limit that is the
default limit for PHP scripts.
...
|
by: Guy |
last post by:
Hi
It might take me a little time to explain this but here goes.
Firstly I'm not using the latest upto date python releases so my first
plan is to try more upto date rels of python and win32 libs, as this
has fixed problems for me in the past (Don't like doing this as it
usally breaks stuff and sys admin are slow to update software,
although they do a cracking job, just covering my back.)
I've created a build script for my companies...
|
by: Birgit Rahm |
last post by:
Hello newsgroup,
I am a beginner, so I am asking maybe immoderate questions.
I want to delete a variable, after filling it with complex objects. How
should I do it?
e.g.
AAA =
AAA =
Can I
1) AAA =
|
by: Lars Eighner |
last post by:
What does this me?
/usr/ports/lang/php5-cli/work/php-5.0.5/main/streams/streams.c(1209) : Freeing
0x083AC564 (1 bytes), script=/home/webmaster/allphp/main.php
/usr/ports/lang/php5-cli/work/php-5.0.5/ext/standard/file.c(472) : Actual locati
on (location was relayed)
Last leak repeated 5 times
=== Total 6 memory leaks detected ===
Is it my script or is it php? The script output appears
|
by: Adrian |
last post by:
Hi
I have a JS program that runs localy (under IE6 only) on a PC but it has
a memory leak (probably the known MS one!)
What applications are there that I could use to look at the memory usage of
each object within my JS app to help locate my problem?
Thanks
| |
by: Piotrek |
last post by:
Hi all.
I have a web app, in which I use frames. My main frameset consists of
three inner frames.
When some button is pressed in frame A, then content of frame B is
reloaded. I am using such code to achieve this:
string strRedirect;
strRedirect = "<script language='Javascript'>";
strRedirect += "parent.body.location.href='WFSearchResult.aspx';";
|
by: kiran kumar |
last post by:
Hi All,
I am working on embedded python on C these days. I feel there is a
memory leakage in this code. I have used our own memory pool and all
the python code will use the heap from this memory pool.
RunScript(pScriptName,pFuncName,...)
{
PyEval_AcquireLock()
threadState = Py_NewInterpreter();
PyThreadState_Swap(threadState);
|
by: Bruno Barberi Gnecco |
last post by:
I'm using PHP to run a CLI application. It's a script run by cron that
parses some HTML files (with DOM XML), and I ended up using PHP to integrate with
the rest of the code that already runs the website.
The problem is: it's eating more memory than a black hole. It eats the
current limit of 256MB set in php.ini, in an application that would hardly
consume 4MB if written in C. I don't care if this application takes much longer
to run...
|
by: dhtml |
last post by:
(originally mis-posted on m.p.s.jscript...)
I've just closed all windows in Firefox and its using 244MB of memory.
I have no idea why. I had GMail open, a page from unicode, the CLJ FAQ.
I've noticed that createElement leaks. It's obvious with form controls
because the form keeps the control name as a property.
Example:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |