Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was developing a seekable implementation of AES and when I ran it; a high pitched noise started coming from inside my computer.

I know it was NOT the hard drive because there was hardly any hard disk activity at all, and I had recently replaced my hard drive. This seems to happen when I memcpy a huge array of bytes from one location in RAM to another, then delete it, and refill the buffer with data from a MemoryStream.

It's such a high pitch that some people can't hear the noise. It's not coming from my speaker, and I have no modem or motherboard speaker in my computer that could be making the noise. What could be causing this noise, and why would it only happen when running huge memcpy operations?

share|improve this question
    
I really doubt it's actually your RAM. Probably a function of heat and cooling devices. Can you rule out and of your fans? By the way, your hard drive being new, does make it kind of suspect as new hardware has a relatively high probability of failure, at first - as it may be defective. –  Doc Jul 4 '11 at 16:55
    
What is the source of your "memory stream?" Are you utilizing hardware-accelerated AES features that are included with modern Intel CPUs? truecrypt.org/docs/?s=hardware-acceleration –  Randolf Richardson Jul 4 '11 at 16:55
    
I am not using hardware-accelerated AES, because I made my own implementation of AES which is completely software-based. I needed a secure way to encrypt data (meaning a high amount of apparent entropy), and perform well when seeking at the same time. Also; my CPU does not support hardware-accelerated encryption. –  IDWMaster Jul 4 '11 at 16:59
    
When you notice this happening, is your CPU working hard? Can you make your CPU work hard on something else and see if it happens then too? –  Doc Jul 4 '11 at 17:01
    
What kind of motherboard do you have? Some motherboards adjust the voltage regulator's frequency on-the-fly in response to CPU load and power demand. Frequent switching of CPU load or other power requirements (depending on your algorithm's implementation) may cause this. Also, are you using CUDA or OpenCL? –  Breakthrough Jul 4 '11 at 17:03

3 Answers 3

up vote 3 down vote accepted

Some motherboards allow variable loading on their supplied power to devices, which use high frequency voltage regulators. These are similar to the VRMs on your graphics card. Under load, the duty cycle and frequency of the voltage regulators ramp up to improve your system's stability (at the cost of more heat).

This can also present another side effect, a high-pitched whine. Unfortunately, it may be difficult to pin-point, but as you've said, you are using CUDA/OpenCL. I'll assume for arguments sake that you only implemented these as you yourself have a card that supports GPU computation, so I would point my sights towards the GPU. (Update from question's author, offloading GPU computation has not helped)

Failing that, you might want to consider looking into the motherboard's power regulators (I know ASUS motherboards are usually quite customizable). It may be only a specific frequency which causes the noise you experience, and you may be able to set the VRM frequency manually.

share|improve this answer

I've heard that before. It's common that people running power intensive algorithms on a computer notices high pitched noises and, in some cases, can tell which part of the algorithm running by the distinctive pitch sound. It seems that's something related to the power consumption and the variation of the PWM duty cycle inside the PSU in order to adapt to the CPU power requirements.

share|improve this answer
1  
Doesn't really even need to involve a change frequency/duty cycle by the power supply. If there are inductors in PS output circuit, they will tend to "hum" from the rapidly changing power demands of the CPU. –  Daniel R Hicks Jul 4 '11 at 19:36
    
Interesting. I noticed that only 2 lines of code in my algorithm seem to be causing this noise, and when I remove them (and replace them with a longer, less-intensive version of that part of the code), the noise stops. –  IDWMaster Jul 4 '11 at 20:13
    
@IDWMaster, maybe put a few no-ops after each of the two lines and see if that fixes it? (not the best solution, but it might solve the problem without affecting speed too much) –  Breakthrough Jul 4 '11 at 23:10
    
No. That does not seem to solve or correct the problem. The best way to solve it was to optimize that section of code, and allocate less memory at a time (allocate RAM in blocks instead of a huge segment at once). –  IDWMaster Jul 5 '11 at 4:36
    
@DanH, actually, computer power supplies are an example of a switched-mode power supply, which does change the frequency/duty cycle in response to different loading. The inductors are only present to create filters to reduce switching noise. –  Breakthrough Jul 5 '11 at 13:18

While devices that consist of only printed circuits, chips, and the occasional resistor and capacitor can, in theory, make noise at sufficiently high power levels, I'd more likely suspect a power transformer/inductor of some sort (assuming there really is no "beeper" type device in the box).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.