6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 9:17 am

All times are UTC




Post new topic Reply to topic  [ 65 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
PostPosted: Tue Oct 17, 2017 6:45 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
It's a common complaint that the microcomputers from the 70s and 80s were in some ways faster, or at least felt more responsive, than modern machines.

Here's an article looking into that, by doing actual measurements. I'm sure it'll be worth reading followups too, as he's started with the keyboard, expecting to rule that out but actually finding something interesting.

Quote:
Anyway, at the time I did these measurements, my [modern fast PC] had worse latency than a quick machine from the 70s (roughly 6x worse than an Apple 2), which seems a bit curious. To figure out where the latency comes from, I started measuring keyboard latency because that’s the first part of the pipeline. My plan was to look at the end-to-end pipeline and start at the beginning, ruling out keyboard latency as a real source of latency. But it turns out keyboard latency is significant! I was surprised to find that the median keyboard I tested has more latency than the entire end-to-end pipeline of the Apple 2. If this doesn’t immediately strike you as absurd, consider that an Apple 2 has 3500 transistors running at 1MHz and an Atmel employee estimates that the core used in a number of high-end keyboards today has 80k transistors running at 16MHz. That’s 20x the transistors running at 16x the clock speed – keyboards are often more powerful than entire computers from the 70s and 80s! And yet, the median keyboard today adds as much latency as the entire end-to-end pipeline as a fast machine from the 70s.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 7:04 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
I'm not a games person, so I never thought about the matter of key delays where 25 or 50ms is way too much and they want 1ms. I do wonder however why my computer with a 3.2GHz dual-core 64-bit processor and 6GB of RAM sometimes goes 15 seconds at a time without responding to the keyboard or the mouse buttons. This happens mostly in Firefox. I've had it also in Thurnderbird, to a lesser extent. Curiously, those are both Mozilla products. I don't think I've noticed the problem in any other software I run on this computer. I suspect there's a task-scheduling problem in FF and TB, and/or in memory allocation and garbage collection. It's not disc-swapping. The disc light is not on, and according to the System Monitor software, the RAM is not full.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 7:22 am 
Offline

Joined: Sun Apr 10, 2011 8:29 am
Posts: 597
Location: Norway/Japan
Interesting. Now that you mention it I actually notice the key delays. Or rather, I've been aware of it but didn't think conciously about it. It does have an effect, because I've found that if it's just slightly larger than normal I start making typing mistakes if I look at the text I'm writing (so much so that if I work on a long latency line I always type blindly - I don't watch the keys and I don't watch the screen. Otherwise I mess up the typing).
So I'm watching now (on the directly connected keyboard) and I do notice the tiny lag.

The other thing about new and old computers is of course that the old ones started instantly and the new ones don't.. thus I was very happy with my Japan-bought laptop which boots from cold to fully running in about five seconds. However, I shouldn't have connected a 12V adapter to the USB hub I connected to the PC.. argh. But the adapters looked the same.. (conclusion: Buy the Dymo label maker and start labling chargers *before*, not after, incident.)


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 9:06 am 
Offline

Joined: Tue Jul 24, 2012 2:27 am
Posts: 679
When old computers with their directly memory-mapped hardware were running software, it basically turned the entire machine into a specialized single-purpose device for that software. Modularity ended that.

_________________
WFDis Interactive 6502 Disassembler
AcheronVM: A Reconfigurable 16-bit Virtual CPU for the 6502 Microprocessor


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 9:14 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1431
There might be worse things than keyboard delays.

When we had to migrate from 80386 (DOS) with 8 Bit ISA interface cards to Pentium (M$ Windows) with PCI interface cards at work,
the speed at which Bit could be toggled at the outputs of the interface card had dropped by factor 10 or so.

PCs might be getting faster with every year, but it also feels like getting "real_world data" into and out of the PC
is getting harder\slower with every year...


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 12:35 pm 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
Quote:
When we had to migrate from 80386 (DOS) with 8 Bit ISA interface cards to Pentium (M$ Windows) with PCI interface cards at work,
the speed at which Bit could be toggled at the outputs of the interface card had dropped by factor 10 or so.
I was similarly disappointed when I tried to send every bus access of a 6502 over USB. It seems you can dump enormous amounts of data over USB but it is not designed to send individual bytes thousands of times per second.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 1:48 pm 
Offline

Joined: Sat Aug 19, 2017 1:42 pm
Posts: 35
Location: near Karlsruhe, West-Germany
GARTHWILSON wrote:
I do wonder however why my computer with a 3.2GHz dual-core 64-bit processor and 6GB of RAM sometimes goes 15 seconds at a time without responding to the keyboard or the mouse buttons. This happens mostly in Firefox.

Two poblems: Windows is not a real multitasking environment, and Firefox became horrible especially everything with Javascript.

Some weeks ago I updated from 45(esr) to 52(esr). I will return to 45(esr).

Regards, Ralf


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 2:09 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
GARTHWILSON wrote:
I do wonder however why my computer with a 3.2GHz dual-core 64-bit processor and 6GB of RAM sometimes goes 15 seconds at a time without responding to the keyboard or the mouse buttons. This happens mostly in Firefox. I've had it also in Thurnderbird, to a lesser extent.


I know *exactly* why this happens. Well, not exactly but I know who's causing it. It's the networking stack. I literally have 20+ years of experience with this. Let me explain...

When I was in my 20's I got a job doing networking and PC repair. We used Windows 95/98 for home PC's and Windows NT 4 (sometimes 3.x) for servers (plus some Linux and FreeBSD). Anyway, this was a time when dial-up was the norm and we were setting up 64/128K ISDN lines for our business clients.

I started noticing a pattern back then and didn't think much of it. But when the dial-up would go offline or even the ISDN would have trouble, the entire computer would freeze. All of them. Linux, NT, etc. Back in the day I could reproduce this at will by simply pulling out the phone cord while transferring data. It's like the computer couldn't handle the sudden loss of connection.

I was always puzzled by this. Why would the entire OS be affected when just one piece of it had issues? I could understand the RAM, glue or CPU having issues but networking?

Over the years I noticed the problem never got any better. I upgraded our computers many times with the newest everything...maxed out RAM and CPU. Dial-up went away and we now have DSL and then fiber.

So fast-forward to today in my corporate office with (literally) $100K+ switches and routers connected to my $5K laptop...and I'm Chrome on a 1Gb connection....the network hiccups and nothing responds for a few seconds. Nothing.

I really don't know what the true reason is but I'm convinced it's network related most of the time.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 4:01 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Indeed, complex (or even over-complex) stacks, with unexpected dependencies, are part of the world now. Lots of layers of timeouts and retry intervals. On platforms which run with virus protection, every file access is intercepted and analysed, which doesn't make anything any faster. The filesystem itself is a lot more complex than it used to be, and contains many large directories and huge files. A database (such as the Windows Registry) might be large and fragmented.

Two other things: virtual memory means you may be paging to hard drive, and large memory spaces mean your application might be garbage collecting for a time. (Also, a hard drive which is beginning to fail will retry accesses, which hurts performance a lot, and to some extent hides the problem which is likely to get worse over time.)

Perhaps the simplest: the entirety of the software system is now orders of magnitude more than one person can understand, and therefore any kind of investigation or insight is hampered.
http://www.informationisbeautiful.net/v ... s-of-code/


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 4:03 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
(BTW, Firefox 57 apparently contains a number of performance improvements.
https://blog.mozilla.org/blog/2017/09/2 ... r-edition/
)


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 4:17 pm 
Offline

Joined: Thu Jan 21, 2016 7:33 pm
Posts: 282
Location: Placerville, CA
BigEd wrote:
Two other things: virtual memory means you may be paging to hard drive, and large memory spaces mean your application might be garbage collecting for a time.

These are big ones as far as those 15-second delays go. What drives me crazy is how the entire system can grind to a halt if one application needs to swap. I've seen this on Windows, Mac, and *nix - run a browser with a bunch of tabs chewing up a couple GB, and the whole computer, from the UI layer down to other applications, starts to judder or just stops until the hard-disk light goes off. So much for multitasking!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 4:22 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Yes, I think it happens relatively often, that something which shouldn't need to block or affect something else, does do so. A fallout from the complexity, I think.

Memory space is a particularly hard one. Should a large application size itself according to 90% of the machine's physical memory, or 50%, or 25%, or what? It really depends. If it uses too much, you'll get paging, and if it uses too little, you'll get garbage collection. If it's the only thing running, it should be big, but if other things are running - or are going to be running - it should not be so greedy. Much like caching and paging, the right answer involves predicting the future: notoriously difficult.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 6:23 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
Some really good info has been presented here. Thanks. I will reiterate though that when I get these delays, my hard-disc light is off. The hard disc is not being accessed at the time.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 17, 2017 7:16 pm 
Offline

Joined: Tue Jul 24, 2012 2:27 am
Posts: 679
The biggest problem with Firefox is that it's still mostly single-threaded, at least in the stable released versions. Something like a long processing loop in JS, garbage collection, or maybe even a very complex layout task will hang the entire application. It's too big and does too much to be in a single thread, which is especially pathetic given the number of cores these days.

Of course, in playing catchup to Chrome they're going to solve this by going multi-process, which will keep it more responsive but bring a lot more overhead to an application type that already regularly eats all your memory.

_________________
WFDis Interactive 6502 Disassembler
AcheronVM: A Reconfigurable 16-bit Virtual CPU for the 6502 Microprocessor


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 18, 2017 12:29 am 
Offline

Joined: Sat Jun 04, 2016 10:22 pm
Posts: 483
Location: Australia
I have trouble understanding why internet browsers eat such horrendous amounts of memory. And I think the multi-process model is partly a way to obfuscate how much memory/CPU time things are using. I'm pretty sure there's no real need to go multi-process. Multi-thread will probably cut it plenty fine.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 65 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: