w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Wordpress High CPU Usage
First of all you should have to install " WP Overview (lite) Footer Memory Usage " plugin on your server and you can check it... And also install " W3 Total Cache " and cache your files and images from the server. You can increase a speed of your side with this plugin.

Categories : PHP

High CPU Usage by Tomcat
There is not sufficient information / evidence to explain what is going on. This could be a direct result of having an excessive number of request threads, or it could underlying problem in your webapp that is exacerbated by the number of threads. The only (possible) clue I can pull out of this is that (maybe) the high TakeQueue value means something is doing a lot of internal request forwarding. I suggest: Reduce the number of threads by a factor of 10 or more to see if that makes any difference. It is a bad thing to have a huge number of threads active at the same time. As in ... bad for system performance. Use visualvm to try tp work out what the worker threads are doing. See if you can spot errors or unusual behaviour in the tomcat logs, and the request logs. (Turn the logging

Categories : Java

High CPU usage with SDL + OpenGL
Loops use as much computing power as they can. The main problem may be located in: int delay = 1000 / 60 - (SDL_GetTicks() - now); your delay duration may be less than zero so that your operation may be just an infinite loop without waiting. You need to control the value of variable delay. Moreover, in the this link: it is proposed that SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL,1); can be used to enable vsync so that it will not use all the CPU

Categories : C++

mongodb high cpu usage
Here's a summary of a few things to look into: 1. Observed a large number of connections and cursors (13k): - fix: make sure your connection pool is appropriate. For reporting, and your current request rate, you only need a few connections at most. Also, I'm guessing you have a m1small instance, which means you only have 1 core. 2. Review queries and indexes: - run your queries with explain(), to observe how the queries are executed. The right model normally results in queries only pulling very few documents and utilization of an index. 3. Memory (compact and readahead setting): - make the best use of memory. 1.6GB is low. Check how much free memory you have, and compare it to what is reported as resident. A couple of common causes of low resident memory is due to fragmentation. I

Categories : Ruby On Rails

CPU usage goes high when read
If you're seeing memory pressure during reads, you're probably reading too many rows at once. Tracing the request can give more visibility into what's going on: http://www.datastax.com/dev/blog/tracing-in-cassandra-1-2

Categories : Cassandra

High CPU usage when reading from console
I assume you have some kind of code that checks the status of readLine(), otherwise Java will continue to block. String line = null; while ((line = br.readLine()) != null) { // handle contents of line here } You may be better off using the Scanner class to read user input. Scanner sc = new Scanner(System.in); int num = sc.nextInt(); ....

Categories : Java

Can High CPU usage be avoided in FileServer?
For TCP sockets function receive_data may not work correctly. The fact that it allocates a new local buffer suggests that this buffer gets destroyed when the function returns. This implies that receive_data cannot handle incomplete messages. A correct approach is to allocate a buffer for each socket once. Read from the socket into that buffer and then process and discard complete messages in the front of the buffer. Once all complete messages have been consumed, move the tail of the buffer that contains an incomplete message to the front and next time the socket is ready for reading append new bytes to the end of the incomplete message until it gets complete.

Categories : C++

Memcached slow gets, high CPU usage
Well, I've found the problem! To get an idea of the requests per second I used the memcache.php file that's available out there. It told me that there were 350 requests per second. The thing is that there has been quite an increase of use in the past few days, and the requests/second is really just an average over the entire uptime. Calculated by (hits+missed)/uptime. Now after restarting memcached this average returns more correct values and there are actually 4000 requests per second. tl;dr: Wrong stats in first post. Correct stats are: 4000 requests/second. I suppose my hardware simply can't cope with that.

Categories : PHP

Image viewer and high ram usage
Here is my take: <Window x:Class="LargeJpeg.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Image x:Name="Image" Stretch="None"/> </Window> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); var bitmap = new BitmapImage(); bitmap.BeginInit(); bitmap.CacheOption = BitmapCacheOption.None; bitmap.UriSource = new Uri(@"C:5x5.jpg", UriKind.Absolute); bitmap.DecodePixelWidth = (int)Image.ActualWidth; bitmap.EndInit(); bitmap.Freeze(); Image.Source = bitmap; } } Average memory usage: 130 mb on a

Categories : C#

Android game, battery usage is very high
Charging from a USB port in your PC is going to be very slow (the USB is also transferring data, not just power). I would think it is okay for a game to use more charge than it is receiving when connected to a PC USB port.

Categories : Android

.NET - high memory usage by clr.dll and native heaps
Use !dumpheap -stat at each stage. You may be able to find which type is getting increased drastically at each stage. On those objects use !gcroot <"addr"> to find which object is holding it from getting garbage collected.

Categories : Dotnet

CPU usage is high when using opengl control class?
This needs more investigation but you may have problems with your main-loop. This probably is not a problem with OpenGL, but with usage of WinApi. When you add textures, models, shaders... your cpu usage should be similar. You use SetTimer(1, 1, 0); it means 1 millisecond of delay as I understand? Can you change it to 33 milliseconds (33 FPS)? That way you will not kill your message pump in mfc app. Note that this timer is very imprecise. link to [Basic MFC + OpenGL Message loop], (http://archive.gamedev.net/archive/reference/articles/article2204.html), using OnIdle() Here is a great tutorial about MFC + opengl + threading - @songho http://gamedev.stackexchange.com/questions/8623/a-good-way-to-build-a-game-loop-in-opengl - discussoion regarding mail loop in GLUT

Categories : Visual Studio 2010

Named pipes in service causes high CPU usage
Unless the service sleeps/awais at some point, it's a perfectly normal behavior. By default, a while true{} loop will use 100% of the processing power of where it's executing. 25% sounds a lot like 1/4 of the 4 threads available on your computer. You actually want to use 100% of the CPU whenever you code, else why are you paying for faster computers ?...

Categories : C#

Laravel Artisan Queues - high cpu usage
I had the same issue. But I found another solution. I used the artisan worker as is, but I modified the 'watch' time. By default(from laravel) this time is hardcoded to zero, I've changed this value to 600 (seconds). See the file: 'vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php' and in function 'public function pop($queue = null)' So now the work is also listening to the queue for 10 minutes. When it does not have a job, it exits, and supervisor is restarting it. When it receives a job, it executes it after that it exists, and supervisor is restarting it. ==> No polling anymore! notes: it does not work for iron.io queue's or others. it might not work when you want that 1 worker accept jobs from more than 1 queue.

Categories : Laravel

Clock_gettime showing high usage during profiling of code
It's all relative to whatever else your program is doing, and keep in mind that if you're doing any I/O, the actual CPU time your program uses may be small, and gprof doesn't see anything else. So if some calls to timing routines get stuck in there, and they are called often enough, sure they can show a high percent. Why doesn't gprof show where they're being called from? For routines compiled with -pg, it tries to figure out who the caller is when any routine is entered. It tries, but that doesn't mean it succeeds. Anyway, that's gprof.

Categories : Misc

MSMQ System.Messaging high resource usage
Why not host your queue reader process in a windows service. This will continually poll the queue each 10 seconds. Then use the windows scheduler to start/stop the service at relevant times to create your service window. This means you won't need to do anything complicated in your scheduled task, and you won't be loading and unloading all the time.

Categories : C#

Linux free shows high memory usage but top does not
Don't look at the "Mem" line, look at the one below it. The Linux kernel consumes as much memory as it can to provide the I/O cache (and other non-critical buffers, but the cache is going to be most of this usage). This memory is relinquished to processes when they request it. The "-/+ buffers/cache" line is showing you the adjusted values after the I/O cache is accounted for, that is, the amount of memory used by processes and the amount available to processes (in this case, 578MB used and 7411MB free). The difference of used memory between the "Mem" and "-/+ buffers/cache" line shows you how much is in use by the kernel for the purposes of caching: 7734MB - 578MB = 7156MB in the I/O cache. If processes need this memory, the kernel will simply shrink the size of the I/O cache.

Categories : Linux

Python OpenCV extremely high CPU usage after 10 second runtime
You should run a profile of your code with CProfile and see what's chewing up your resources. The official docs on profiling are here: http://docs.python.org/2/library/profile.html

Categories : Python

What is proper way to write a chrome extension with high I/O usage
Unfortunately, you cannot raise the quota. However, you can save your settings in some global variable or chrome.storage.local and periodically write them to chrome.storage.sync.

Categories : Javascript

Why doesn't this item get removed from the cache when memory usage is high?
I would expect the CacheItemRemoveCallback to be fired Why do you expect that? I'd expect you to get an OutOfMemoryException fairly quickly on a 32-bit machine (*) - after a minute or so, by which time you'll have approx 1.2GB in your list. (*) unless the OS is started with the /3GB switch, in which case it will behave similarly to a 32-bit process on a 64-bit machine. On a 64-bit machine, your request will time when the a default of 90 seconds, by which time it will have added 90*200 = 1800 items = approx 1.8GB to your static list. A 64-bit process will handle this, and probably a 32-bit process would be able to do so on a 64-bit machine if it is LARGEADDRESSAWARE, which is definitely the case for IIS; not sure about Cassini. Also, ISS would probably recycle your application do

Categories : Asp Net

Excessively high memory usage in .NET MVC/Entity Framework application
We are automatically assuming that the problem is the EF. Can be, can be not. There are a lots of points that we should take care, not only data access infrastructure. With data access issued, as you are using only EF, you can gain fast improvement using simple .AsNoTracking() method. Adopt a ServiceLocator to help you manage your contexts pool. You can also user Dapper, instead of EF, in ReadOnly situations. And for last, but not least, use pure ADO.NET, for the more complex queries and a fastest execution. Refactor your ActionFilters to avoid using some "BaseController" that all controllers inherits is a good practice either. Check if your IDisposable classes are truly being supressed by CG, adopting the .Dispose(bool) pattern. Be sure that you are not persisting cache variables fo

Categories : Asp Net Mvc

CPU usage not maximized and high synchronization in server app relying on async/await
It sounds like your server is almost completely asynchronous (async MSMQ, async DB, async HttpClient). So in that case I don't find your results surprising. First, there is very little CPU work to do. I'd fully expect each of the thread pool threads to sit around most of the time waiting for work to do. Remember that no CPU is used during a naturally-asynchronous operation. The Task returned by an asynchronous MSMQ/DB/HttpClient operation does not execute on a thread pool thread; it just represents the completion of an I/O operation. The only thread pool work you're seeing are the brief amounts of synchronous work inside the asynchronous methods, which usually just arrange the buffers for I/O. As far as throughput goes, you do have some room to scale (assuming that your test was floodin

Categories : C#

Phonegap app uses high RAM because filereader() and change loaded pics to white instead because of memory usage
1000 images of those dimensions is a significant amount of data so will take a significant amount of RAM. Do you really need all 1000 to be in memory at the same time? Without knowing the user interface layout and use case requirements for your app I'm just speculating, but could you not, for example, load each image on demand asynchronously as it needs to be displayed? Or if the delay in reading the image from the file system creates an unacceptable delay in displaying it, you could pre-load just some of the images, for example if they are in a sequence, then just have a couple in memory either side of the currently displayed image.

Categories : Cordova

Restoring keyboard settings in Xorg environment after suspending
The problem was resolved by adding a custom script /etc/pm/sleep.d/00-keyboard that executes (not only) on system resume: #!/bin/bash case $1 in hibernate) # Going to suspend to disk ;; suspend) # Going to suspend to RAM ;; thaw) # Resuming after hibernating ;; resume) # Resuming after suspending echo "Restoring keyboard settings..." /opt/scripts/keyboard.sh ;; *) echo "Something went wrong" ;; esac For more information see https://wiki.archlinux.org/index.php/Pm-utils#Creating_your_own_hooks

Categories : Linux

.NET application memory usage - high unused .NET and unmanaged memory and fragmentation
As Alex already pointed out a very nice explanation of the problem class large object heap fragmentation is found here: https://www.simple-talk.com/dotnet/.net-framework/the-dangers-of-the-large-object-heap/ The problem is well known in the .NET FX Dev Team and continuously been worked at. There is a good chance that the symptoms fade off using more recent FX releases. Starting with .NET 4.5.1 there will be a GC method call to even compact the LOH: http://blogs.msdn.com/b/mariohewardt/archive/2013/06/26/no-more-memory-fragmentation-on-the-large-object-heap.aspx However, finding the root cause of the LOHF would be way more efficient than just wiping it of the heap wasting tons of ms's Let me know, if you need further details how to isolate such effects. Seb

Categories : Dotnet

Diagnosing MobileServiceInvalidOperationException
I found the answer myself. I'll share it with you in case another Azure Mobile Services beginner is looking for this. On the Azure management portal, go to your mobile service. There is a "Logs" tab which records server-side errors. That's all I needed:

Categories : Azure

Diagnosing non-reproduceable bugs?
You should probably start by installing a crash reporting tool like Crashlytics. This may give you the clues you need or at least help you narrow down where to put additional crash logging.

Categories : IOS

iOS - Diagnosing EXC_BAD_ACCESS with NSZombie
Since the error message says that you have an uncaught exception of class _NSZombie_NSException, you could have an exception that gets freed before it has been thrown or caught. Turning on both NSZombies and running the app from the debugger with the All Exceptions breakpoint could help, but using Instruments's Zombies template is probably more worthwhile, since it tracks object allocations and deallocations.

Categories : IOS

Diagnosing a disk I/O bottleneck?
We ended up using Red-Gate's ANTS profile to identify a memory leak during a 'soft restart' of the service (dispose/reallocate objects). Normal flow of operation had no issues, flat memory profile, clean bill of health. Only after we introduced a timer to simulate a series of unexpected issues that would result in soft restarts were we able to identify an increasing number of lingering objects and reproduce the issue resulting in massive memory usage and horrible amounts of page faults with deteriorating performance. My theory is that all this paging to disk impacted both our ability to write to the log file and also to allocate new objects.

Categories : Dotnet

Diagnosing Worklight 6 SQL Adapter issue, JPA tracing
The WorklightPU WARN in the log is not relevant and has been removed in newer releases of Worklight. For your actual issue, see the following developerWorks threads with the same issue that was resolved. Type 'Function' currently does not support marshalling to JSON. developerWorks thread #1 developerWorks thread #2

Categories : Misc

Diagnosing Scala compile error "value to is not a member of Int"
how did this ever compile/run in the first place? By default, the contents of scala.Predef is imported. There you have method intWrapper which produces a RichInt with method to. You probably have shadowed symbol intWrapper. Does the following work: implicitly[scala.Int => scala.runtime.RichInt] or this: intWrapper(3) to 4 ...if not, there lies your problem. EDIT: So, since you say that compiles, what happens is you replace cColumn with a constant, e.g. for (i <- 0 to 33 -1) { ... } ? It would also help to post the complete compiler message with indicated line etc.

Categories : Scala

PHP slowdown, but where
You can use an && (and) logical operator instead of the nested if: if(!empty($var)&&($var=='123')){ //action } If you're checking for multiple values with loose comparisons ==, instead of a nested if you can use a switch(): if(!empty($var)){ switch ($var){ case "456": //do something break; case "123": //do something break; default: //give them an error or something } }

Categories : PHP

Diagnosing "contains undefined reference for architecture" at linking phase
Been fiddling all day, found it. The method that the link is complaining about has this in it: qt_mac_execute_apple_script This method does not exist in qt5. Also, earlier in the problematic file, I have this: extern bool qt_mac_execute_apple_script(const QString &script, AEDesc *ret); if i comment these lines, the error goes away. So basically, a very bad compiler error for a missing symbol – because the compiler wasn’t nice enough to point out what the actual problem is beyond the vague architecture statement; probably made worse because I’m building my application statically coupled with the extern.

Categories : C++

Azure Could Computing high availoability vs NEO4J high availability?
The short answer is probably yes. Windows Azure provide you infrastructure that allow you to build high availability system, it won't make any system high available by magic. As NEO4J is state-full, each node (with only one node Azure don't give you any SLA, you instance will be down) will need to share some state and the way to do it will be dependent on how NEO4J is working. So you will need to rely on NEO4J mechanism to do it. I don't know how NEO4J is working but you won't be able to skip designing an high available architecture around NEO4J using Windows Azure infra. Cloud may be a magic buzz word that can make things append on management level, but when we are on hard real world level Harry magic wand doesn't exist.

Categories : Neo4j

IIS 6.0 requests slowdown
Looks like all the troubles were in appltication itself. We used ASP.NET form with DataGridView on it (pages were formed on server-side). At the time long-running request comes server has to process it and load data into its memory - so that just blocks other activity. We rewrite application using ASP.NET MVC (client-side pages) and the trouble was gone.

Categories : Asp Net

quicksand sorting price values low to high / high to low
val() gives you a string, so > and < comparisons are lexographical (not numeric). Try wrapping the values in parseInt() or parseFloat(). Make sure to add appropriate error handling as well.

Categories : Jquery

What slows down Java if CPU usage low, hdd usage low, memory usage low?
You can test what is the bottle neck by taking different parts out of the equation. To take out the CPU, just read the files and don't do anything else. To take out the disk, keep reading the same file again and again, assuming it fits in your file cache. Compare this to the time for everything.

Categories : Java

Android App getSpeed() inaccurate on slowdown
The fact that the app is spot on at times lends me to believe that the GPS coverage and the formula for computing the time are fine. Often your value is double or tripple the value of the red device. And that when you are driving around 30 m/h. GPS is super acurate at medium and high speeds (like in vehicles) So the problem is clearly in your algorithm and in asumptions when you get a GPS position. I am thinking that the GPS is trying to update too quickly, thus giving me erratic speeds when the car makes a sudden change. For sure not, It will not update more than once a second. You get problems with GPs only when standing still, then it does often not report 0 km/h, but this is another story. Conclusion: The GPS is not the source of the error, it's your algorithm. Tipps:

Categories : Android

extreme lag after having .wav, .au sound in my game?
As per the Javadoc of the .start() method: Allows a line to engage in data I/O. If invoked on a line that is already running, this method does nothing. Unless the data in the buffer has been flushed, the line resumes I/O starting with the first frame that was unprocessed at the time the line was stopped. When audio capture or playback starts, a START event is generated. There is no mention of the audio being played in an asynchronous manner. This means that your sound will be tackled by the thread which calls the start method, which since you are calling it in your event handler, will eventually mean that your Event Dispatching Thread is taking care of playing audio. This thread is also responsible for drawing stuff on screen, so any other thing that runs on it, audio in you

Categories : Java

Grouping extreme value bins into one "> x" bin
Here's one option: d <- rlnorm(1000, 3) d.cut <- cut(d, c(seq(0, 120, 10), Inf)) hist(as.numeric(d.cut), breaks=0:13, xaxt='n', xlab='', col=1, border=0, main='', cex.axis=0.8, las=1) axis(1, at=0:13, labels=c(seq(0, 120, 10), '>120'), cex.axis=0.8) box()

Categories : R



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.