loading times differ from localhost and remote - windows-7

I'm running a website (made using fuel MVC) which is stored in a computer in my house, so I run it with
http://localhost
and it loads in 200ms, more or less. This time is only the time php script needs to execute, so time to transfer across the network is not taken into account. It is just execution time of the script.
However, when I access the same script out of my network (my pc at work, for example), that time measure is higuer than one second for the same page, and I don't know why it takes almost 10 times more to execute the php script when running it from an outside computer.
The computer I'm running the website on is a Windows 7 Ultimate with 3GB of RAM memory.
Any idea?

Related

Access slow launch from .accdb, but not from within Access application

This just started happening for no good reason I can find.
If I launch the MSACCESS.EXE program, then open a database. The database opens within 1 second.
If I launch the same database by double-clicking on the .accdb file's icon. It takes about 40 seconds for the Access window to appear, and less than 1 second after that the database opens.
The database is local, and both Access and the DB are on an SSD. The system is an Asus Z97 motherboard, i7-4790K # 4MHz (not overclocked) with 32gb RAM and about 200gb of free hard disk space.
In both cases, performance after opening is excellent with no issues. It appears it's only the launching of MSACCESS.EXE by double-clicking a .accdb file that is affected. I double-checked the file association for .accdb and it points to the correct executable.
I captured some data with Performance Monitor during the 40-second pause. MSACCESS.EXE is using about 0.4% CPU, doing almost no disk I/O, and there's no network activity.
I've already tried "Compact and Repair" but that had no effect.
This just started happening, and now seems to be affecting Access on ALL .accdb files. They open instantly from within Access but take 40 seconds to open when double-clicked. I haven't installed any new software or Windows updates recently.
Curiously, if I change the .accdb extension to .accdr (runs the db in the client runtime instead of full Access) the database will launch instantly.
What could possibly be going on here? I've searched the web and found some posts having to do with databases on a network share, but that doesn't apply here.
For anyone else encountering this issue, it appears this bug has nothing to do with Access specifically.
I needed to shutdown the machine, and when I did so, Windows seemed to completely ignore multiple shutdown requests. As I was googling to troubleshoot, after about 10 minutes, the shutdown did finally start. It took another 10 minutes to shutdown.
After rebooting the slow launch problem no longer occurs, there's only about a 2 second delay, which I assume is just MSACCESS.EXE loading "cold".
So, the problem is most likely in Windows and not Access.
I spent ages looking for the answers to this on various sites but eventually cobbled together my own fix, so hopefully this saves others some time.
This worked for me and reduced the load time from circa 4 minutes - even just opening a blank accdb fle - to seconds... So 4 mins if double-clicking an accdb. Once MS Access open and using File | Open it was fast.
I had two instances of MS Access both on Windows Servers that can see the Internet but goes through a corporate proxy etc.
After getting some hints by Googling this issue I suspected that the 4 mins or so was some sort of timeout trying to access a site or sites (MS Office apps do this) and that eventually when the proxy returned a timeout then Access started responding again. It was quick on the 2nd open because it didn't redo this request.
Based on this, I tried to divert certain sites to 127.0.0.1 and turn off all the Internet options in Trust Centre | Privacy etc. Nothing worked.
Finally, I got the solution. In Windows Defender firewall I created a new Application rule for the MSACCESS.EXE. This was an outbound rule that blocked all Internet traffic. After this the first double-click was fast again. I assume with traffic totally blocked, whatever request is going out to sites, is immediately stopped and returns a "no internet" to Access, which then carries out executing, rather than waiting for the 3-4min timeout.

How do I determine the number of times my system has booted within a time period?

I am running a few tests on a windows CPU where it periodically turns on and off. Unfortunately I haven't been able to find a way to determine the number of times the system has booted successfully within a certain time period using the existing OS tools.

How to prevent script from bringing computer to near standstill

I have a bat script which is rather complex and runs every 15 minutes. It opens a browser, runs an iMacro to sign in and download a file, closes the browser, extracts the file, initiates a javascript which verifies that the downloaded file is more recent than the one downloaded 15 minutes earlier, opens Excel, imports the downloaded file, triggers a very involved VB Script, exports a csv file, closes Excel, opens a new browser, logs in to a 2nd site, uploads the csv file and closes the browser again.
Meanwhile I'm doing my job, which requires many browser tabs open in several different browsers, and web development software.
While the script is running, my computer will frequently come to a near standstill, preventing me from doing any other work - presumedly because the CPU usage is maxed out. Not only can I not do other work, but my script frequently fails to complete because the browser is so slow it times out before the page loads.
Task Manager tells me that my CPU usage while running the script is 98-100% and I'm using 7 out of 8 MB of RAM. Obviously, I'm pushing my computer to its limits. Is there anything I can do to help minimize the slow down, such as allocate some RAM, partition my hard drive, make a sacrifice to the processor gods, etc.? My computer is a 64-bit running Windows 7 Pro with 8MB of RAM and a 3.00 GHz processor. I can't get a new computer but I can probably ask for additional RAM if it would help.
I don't know very much about performance optimization, so any suggestions are welcome. I can't stop using the script, run it less often, or run it on a different computer.
In a script that loops to repeat a task immediately then the CPU usage will rise to very high levels.
Using timeout or ping to generate a delay between loops reduces the CPU usage.

Joomla 3.2 seems quite slow: 5-6 seconds per page request, just to get the server started with an answer. Ways to increase response time?

So the times you see is an example of typical development. You fire up your server and mysql database, then login to the backend and try to add a simple thing like a menu item.
The times shown are only for the server to start responding, not for the page to actually finish loading. So this is time, passing on the server in the code, executing queries etc. All the JS files and CSS is not part of this measurement.
I can keep going. Clicking on "New Menu Item" and Hitting "Save" will take just as long.
So for a simple thing like adding a menu item the user spends roughly a minute looking at a blank screen (assuming the user knows joomla by heart and makes no wrong clicks and thus never has to go back).
Caching
So I read about caching. If you enable Page Caching I cannot keep developing because it seems my changes are not getting refreshed, and you really want this feature when you develop.
The View Caching actually speeds up the backend and the frontend a lot. But you still have to access the page once slowly before it gets cashed, and you have to access it again in the timeframe of the existence of the cash to profit from it. So for me, this means the backend is basically always slow. Unless I try to do something like adding 10 menu items within 15 minutes.
I btw run on a brand new notebook which really should not be the problem.
Is there something I am missing out on?
Is this actually normal?
EDIT
I could improve my times to around 2 seconds. The profile shows a lot of red colors though, someone has an idea? The picture is for the view menu manager, main menu menu items.
My times are all below 2 seconds, usually approx 1 both on my development server (a VM running CentOS 6 in virtualbox hosted by a Win7, i7 / 6Gb RAM / SSD disk) and my production server (Xeon dual 2GHz / 4Gb / 10000 rpm SATA disks).
Enable the debug for your site and see in the bottom of the page the times each module / component / event takes to run, this will make it possible to determine if it's a single extension / piece of Joomla eating up all the time, or it's just your machine.
I don't have a particularly good local machine (just a cheap W8 and using EasyPHP) and my times are all much faster than wither yours or those other people are reporting. One of the things you can do is turn on debug and look at the profiling data. When I load the admin login page even with debug on I can see it's onAfterDispatch which is the slowest part of the process.
A lot of times upgrading MySQL will give massive speed improvements.
When working on a localhost, the loading time usually depend on the PC performance. I work a hellish amount of time using wampserver (localhost) at work and on my computer at home.
When installing a fresh copy of Joomla 3.2 on Wamp at home, the step to create the database and insert the default content takes around 7-9 seconds, where as at work, it literally takes under 2 seconds. The reason? Because my work computer performance is much better than my personal computer.
It's the same concept for loading pages in the backend.
Hope this bit of info helped you.

Virtual Development Environment Performance - .NET Development

I have the following setup for my daily/main/only development environment
Hardware/Tin = 4gb ram, 2.6ghz dual core CPU, 2x250gb HD's, usual array of periperhals
One the tin above, I currently have Windows XP installed, in Windows XP I have VMWare Workstation installed and I run a Windows Server 2003 deelopment environment. This includes,Visual Studio 2003/2005/2008, Sql Sever 2005/2008, Full MS Office suite, some producitivity tools (e.g. Redgate Sql/Data Compare, DevXpress Coderush, TestDriven.net etc).
I have problems with this, it runs slow (15 minutes to boot), the Watch/Autos windows in VS freeze up when debugging, I can't have more than 2-3 copies of VS open, the Errors window freezes up, WinGrep and COm+ constantly runs out of Virtual Desktop Memory and so forth (In fact, I would attribue most of the issues to Virtual Desktop Memory)
Now, I've tried every tweak in the book, I have second HD for VMWare, my paging file is on a differnt drive, I've adjusted my Ram split between guest and host, I've hacked the reg key for Virtual Desktop Memory and all of this to no avail.
Now, I could increase my Ram or CPU, but I'm not able to.
My question is, has anybody experienced the above, and if so, how did you solve it? Did you try ESXi? or shift your environment to raw tin?
IMHO, you've tried just about every tweak in the book. I'd suggest that you should just move to native for your main setup, and restrict VM use for testing.
I use a VM as my main dev env, but I don't run as much stuff as you, so I don't hit a big performance wall.
I guess the trick you didn't try was to run less things on your VM. 2-3 copies of VS are a recipe for slowness. Running Sql Server, same thing. Bump up memory would be good, but at least run services (iis, sql server) on another vm or better yet, another box. You are taxing your VM waay too much, it is not VM's fault.
The problem you run into most of the time on VPS is IO wait.
Do you run your virtual machine off of a disk image, if so try defragmenting your drive.
Or did you dedicate a partition to it?
Edit:
I would suggest to:
either try defragmenting the drive that has the disk image
either try dedicating a partition to the virtual machine, instead of using a disk image all together. (ideally the first partition on the drive, since this will have the lowest random access time)
Running off a disk image works, but since you're working on top of a filesystem, the disk image might be fragmented throughout the disk.
Good luck, hope it helps...

Resources