memory-usage

Are there benchmarks comparing the respective memory usage of django, rails and PHP frameworks?

I have to run a Web server with many services on an embedded server with limited RAM (1 GB, no swap). There will be a maximum of 100 users. I will have services such as a forum, little games (javascript or flash), etc. My team knows Ruby on Rails very well, but I am a bit worried about Rails' memory usage. I really do not want to sta...

Poll C# app's memory usage at runtime?

I have an app that, while running, needs to poll its own memory usage. It would be ideal if it could list out the memory usage for each object instantiated. I know this can be achieved by WMI, but I was hoping for something that doesn't rely on WMI. ...

Reducing Django Memory Usage. Low hanging fruit?

My memory usage increases over time and restarting Django is not kind to users. I am unsure how to go about profiling the memory usage but some tips on how to start measuring would be useful. I have a feeling that there are some simple steps that could produce big gains. Ensuring 'debug' is set to 'False' is an obvious biggie. Can any...

Mysql MediumText causes PHP Fatal error: Allowed memory size of 8388608 bytes exhausted

I have my own php data object class that wraps the mysqli library. It works fine handling most datatypes, including text. As soon as I change a table column from text to mediumtext, I get the error described in the title of this question. I've tested my php scripts on several shared hosting environments, and I only get this error on o...

simple php script using 1MB+ memory

I have a really simple PHP script here,which simply loads several libraries (6 or 7 small classes) and initialize some variables then generate a very small amount of html code. But seeing from the memory_get_usage() function, I see 1.21MB memory usage. Is that normal or something is wrong? ...

Any way to make this relatively simple (nested for memory copy) C++ code more effecient?

I realize this is kind of a goofy question, for lack of a better term. I'm just kind of looking for any outside idea on increasing the efficiency of this code, as it's bogging down the system very badly (it has to perform this function a lot) and I'm running low on ideas. What it's doing it loading two image containers (imgRGB for a fu...

Do methods affect the size of my objects?

In .NET, do the number of methods or the size of the methods (i.e., amount of code) within an object affect the amount of memory the object uses when it is instantiated? EXAMPLE: Will an object with 3 int properties and 1 method take up more memory than an object with 3 int properties and 20 methods? If "yes", do static methods take u...

How to determine a process "virtual size" (WinXP)?

I have a program that needs a lot of memory, and it crashes as soon as the 2GB virtual address space is reached. Sysinternals process explorer displays this as "virtual size" column. How can I determine this "virtual size" with C (or C++) code? Ok, I have to query a performance counter for "Virtual Bytes". Perfmon shows the query stri...

C#: Memory usage of an object

Is there a way to find how much memory is used for a particular object? For example a List. Taking everything into account, like string interning and whatever is done by compiler/runtime environment/whatever. ...

What do you use to monitor jscript memory usage in Internet Explorer

We're debugging a GWT app. Runs ok in Firefox, in IE6.0 starts working ok but after some time, it gets on its knees and starts to crawl. After doing some tests we're suspecting some memory problems ( too much memory used, memory leaks, etc ) Besides using taskmanager and processxp to watch the memory usage grow :)....¿do you recommend a...

How can I determine max memory usage of a process in Linux?

I have a program that's running in two different modes. I want to compare the two modes with regard to runtime and memory requirements. Determining runtime is easy with using time. In fact, in this case it's really easy because the program reports both the CPU time and the wallclock time at the end of the test. However, determining m...

Any tool other than Valgrind to monitor memory usage for running processes in Linux?

This answer to this question says that there's no way to attach Valgrind to an already running process. Are there any other tools for Linux that can report on memory usage but can attach to a process that's already running? ...

Is it possible to track memory usage in a C# application without using a profiler?

I'd like to write a simple application which keeps track of its current memory usage, number of created objects etc. In C++ I'd normally override the new operator, but for obvious reasons I can't do this in C#. Is there any way to do this without using a profiler? ...

Is it reasonable for modern applications to consume large amounts of memory?

Applications like Microsoft Outlook and the Eclipse IDE consume RAM, as much as 200MB. Is it OK for a modern application to consume that much memory, given that few years back we had only 256MB of RAM? Also, why this is happening? Are we taking the resources for granted? ...

How to clean caches used by the Linux kernel

I want to force the Linux kernel to allocate more memory to applications after the cache starts taking up too much memory (as can be seen by the output of 'free'). I've run sudo sync; sudo sysctrl -w vm.drop_caches=3; free (to free both disc dentry/inode cache and page cache) and I see that only about half of the used cache was freed...

Limiting the RAM consumption of MS SQL SERVER

I just rolled a small web application into production on a remote host. After it ran a while, I noticed that MS SQL Server started to consume most of the RAM on the server, starving out IIS and my application. I have tried changing the "server maximum memory" setting, but eventually the memory usage begins to creep above this setting. ...

Howto Free Inode Usage

Hi, I have a disk drive where the inode usage is 100% (using df -i command). However after deleting files substantially, the usage remain 100%. What's the correct way to do it then? How is it possible that a disk drive with less disk space usage can have higher Inode usage than disk drive with higher disk space usage? ...

How to get memory usage at run time in c++?

Hello, i need to get the mem usage VIRT and RES at run time of my program and display them. What i tried so far: getrusage (http://linux.die.net/man/2/getrusage) int who = RUSAGE_SELF; struct rusage usage; int ret; ret=getrusage(who,&usage); cout<<usage.ru_maxrss; but i always get 0. ...

Any Java caches that can limit memory usage of in-memory cache, not just instance count?

I am looking for a simple in-memory (and in-process) cache for short-term caching of query data (but short-term meaning beyond request/response, i.e. session boundary). EhCache would probably work, but it looks as if it might not offer one thing that I need: limits not on number of objects cached, but (approximate) limit on amount of mem...

Creating memory stream from ResponseStream Out of Memory Exception

I am making a call to a httprequest which returns a pdf file in the responsestream. This works well for smaller pdf's, but not the file is up around 25-30MB, it is returning an out of memory exception. MemoryStream memStream = new MemoryStream(); byte[] buffer = new byte[2048]; int bytesRead = 0; do ...